Documentation ¶
Index ¶
Constants ¶
View Source
const ( // PartSizeUnit is the unit of part size used for Bucket.Put method. PartSizeUnit = 128 << 20 // UploadParts is the number of parts in a multi-part upload on Amazon S3. UploadParts = 4 << 10 )
Variables ¶
This section is empty.
Functions ¶
func WithCredentials ¶
func WithCredentials(cred aws.CredentialsProvider) func(*s3.Options)
WithCredentials specifies a credential provider.
func WithEndpointURL ¶
WithEndpointURL specifies the endpoint of S3 API.
func WithHTTPClient ¶
WithHTTPClient specifies the http.Client to be used.
func WithPathStyle ¶
WithPathStyle specifies to use the path-style API request.
func WithRegion ¶
WithRegion specifies the region of the bucket.
Types ¶
type Bucket ¶
type Bucket interface { // Put puts an object with `key`. The data is read from `data`. Put(ctx context.Context, key string, data io.Reader, objectSize int64) error // Get gets an object by `key`. Get(ctx context.Context, key string) (io.ReadCloser, error) // List lists the matching object keys that have `prefix`. // The prefix argument should end with /. (e.g. "foo/bar/"). // If / is not at the end, both ojbects xx-1/bar and xx-11/bar are taken. List(ctx context.Context, prefix string) ([]string, error) }
Bucket represents the interface to access an object storage bucket.
func NewGCSBucket ¶ added in v0.16.0
Click to show internal directories.
Click to hide internal directories.