diff --git a/backend/internal/domain/storage.go b/backend/internal/domain/storage.go new file mode 100644 index 0000000..08f2704 --- /dev/null +++ b/backend/internal/domain/storage.go @@ -0,0 +1,20 @@ +package domain + +import ( + "context" + "io" + "time" +) + +type ObjectInfo struct { + Key string + LastModified time.Time + Size int64 +} + +type ObjectStorage interface { + Put(ctx context.Context, key string, r io.Reader, size int64, contentType string) error + Get(ctx context.Context, key string) (io.ReadCloser, int64, string, error) + Delete(ctx context.Context, key string) error + List(ctx context.Context, prefix string) ([]ObjectInfo, error) +}