Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultPartSize = 128 << 20
DefaultPartSize is the default part size used for Bucket.Put method.
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) 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`. List(ctx context.Context, prefix string) ([]string, error) }
Bucket represents the interface to access an object storage bucket.
Click to show internal directories.
Click to hide internal directories.