better doc for interfaces

This commit is contained in:
2022-06-01 11:55:57 +02:00
parent fc19fd867c
commit 816d63ea49
2 changed files with 14 additions and 0 deletions

View File

@@ -15,7 +15,12 @@ type ObjectReader interface {
}
type S3 interface {
// Get the object from the S3 bucket. Returns an error if the object does not exist.
GetObject(ctx context.Context, key string) (ObjectReader, error)
// Check if the given key exists
KeyExists(ctx context.Context, key string) (bool, error)
// Get object metadata. The `Filename` field is optional. Returns nil if the object does not exist.
GetObjectMetadata(ctx context.Context, key string) (*types.Metadata, error)
}