Documentation ¶
Overview ¶
Package s3 implements a very thin wrapper around the AWS S3 client. It only exists to enable stubbing of the AWS S3 client in tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a wrapper around the AWS S3 client.
func (Client) GetObject ¶
func (c Client) GetObject(ctx context.Context, bucket, key, versionID, sseCustomerAlgorithm, sseCustomerKey, sseCustomerKeyMD5 string) (*s3.GetObjectOutput, error)
GetObject returns the object with the given key from the given bucket. If a versionID is given, the specific version of the object is returned.
func (Client) PutObject ¶
func (c Client) PutObject(ctx context.Context, bucket, key, tags, contentType, objectLockLegalHoldStatus, objectLockMode, sseCustomerAlgorithm, sseCustomerKey, sseCustomerKeyMD5 string, objectLockRetainUntilDate time.Time, metadata map[string]string, body []byte) (*s3.PutObjectOutput, error)
PutObject creates a new object in the given bucket with the given key and body. Various optional parameters can be set.
Click to show internal directories.
Click to hide internal directories.