Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct { Region string AccessKey string SecretKey string MinIOEndpoint string LocalRootDir string Bucket string }
Options for object storage.
type Storage ¶
type Storage 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) // List enumerates the list of objects in a bucket. List(ctx context.Context, bucket, prefix string) ([]string, error) // Delete removes an object from the store. Delete(ctx context.Context, bucket, key string) error }
Storage abstract uploading and download files from different object storage solutions.
Click to show internal directories.
Click to hide internal directories.