Documentation ¶
Index ¶
- type ObjectInfo
- type Option
- type S3BucketConfig
- type S3Client
- func (s *S3Client) BucketName(ctx context.Context) string
- func (s *S3Client) Get(ctx context.Context, key string) (io.Reader, error)
- func (s *S3Client) ListObjects(ctx context.Context) ([]string, error)
- func (s *S3Client) ObjectInfo(ctx context.Context, key string) (*ObjectInfo, error)
- func (s *S3Client) Put(ctx context.Context, key string, r io.Reader, contentType string) error
- func (s *S3Client) ValidateBucket(ctx context.Context) error
- type Upload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ObjectInfo ¶
type Option ¶
func WithAssumeRole ¶
WithAssumeRole allows you to assume an external role to perform actions. It can be specified multiple times, and the specified roles will be assumed in order.
func WithCredentials ¶
WithCredentials configures an AWS S3 access key and secret access key for the s3config.
func WithCustomEndpoint ¶
WithCustomEndpoint sets a custom AWS S3 endpoint URL for the s3Config.
func WithMaxDownloadFilesize ¶
WithMaxDownloadFilesize limits the maximum number of bytes that a file is allowed to have in order to be uploaded or downloaded. Any values greater than or less than zero results in no limit.
func WithRegion ¶
WithRegion sets an AWS S3 region for the s3Config.
type S3BucketConfig ¶
type S3BucketConfig struct {
// contains filtered or unexported fields
}
type S3Client ¶
type S3Client struct {
// contains filtered or unexported fields
}
func NewClientFromURI ¶
NewClientFromURI parses an s3://bucket/uri and creates a client. It also returns the key specified in the URI.
func (*S3Client) BucketName ¶ added in v0.0.21
func (*S3Client) ListObjects ¶
ListObjects lists all the objects in the AWS S3 bucket.
func (*S3Client) ObjectInfo ¶
ObjectInfo returns the object info from AWS S3.