1
0

interface.go 538 B

1234567891011121314151617181920212223
  1. // Copyright (C) 2025 The Syncthing Authors.
  2. //
  3. // This Source Code Form is subject to the terms of the Mozilla Public
  4. // License, v. 2.0. If a copy of the MPL was not distributed with this file,
  5. // You can obtain one at https://mozilla.org/MPL/2.0/.
  6. package blob
  7. import (
  8. "context"
  9. "io"
  10. )
  11. type Store interface {
  12. Upload(ctx context.Context, key string, r io.Reader) error
  13. Download(ctx context.Context, key string, w Writer) error
  14. LatestKey(ctx context.Context) (string, error)
  15. }
  16. type Writer interface {
  17. io.Writer
  18. io.WriterAt
  19. }