Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UploadDownloader ¶
type UploadDownloader interface {
// Upload uploads a file to an object storage.
Upload(ctx context.Context, bucket, key string, file io.Reader) error
// Download downloads a file from a remote object storage location.
Download(ctx context.Context, bucket, key string, file io.Writer) error
// MakeBucket creates a new bucket.
MakeBucket(ctx context.Context, bucket, location string) error
// Exists checks whether an object exists.
Exists(ctx context.Context, bucket, key string) (bool, error)
}
UploadDownloader abstract uploading and download files from different object storage solutions.
func New ¶
func New(cfg config.StorageCfg) (UploadDownloader, error)
Click to show internal directories.
Click to hide internal directories.