diff --git a/storage/storage.go b/storage/storage.go index 63f556f..9aa1041 100644 --- a/storage/storage.go +++ b/storage/storage.go @@ -9,20 +9,22 @@ import ( type Storage interface { Signer Uploader - Downloaded + Downloader } type Signer interface { - // GetSignedURL returns a signed URL. The URL is valid for the given duration + // GetSignedURL returns a signed URL, and an error if the operation fails. GetSignedURL(context.Context, string, time.Duration) (string, error) } type Uploader interface { - // Upload uploads a file. Returns an error if the upload fails + // Upload uploads a file. + // Returns an error if the upload fails. Upload(context.Context, string, io.ReadSeeker) error } -type Downloaded interface { - // Download downloads a file. Returns content, content type and error +type Downloader interface { + // Download downloads a file. + // Returns content, content type and error if the download fails. Download(ctx context.Context, name string) ([]byte, string, error) }