Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Endpoint ¶
func Endpoint(endpoint string) func(*BucketOptions)
Endpoint set the endpoint option on the S3 connection.
func UseSSL ¶
func UseSSL(useSSL bool) func(*BucketOptions)
UseSSL sets the SSL option on the S3 connection.
Types ¶
type Bucket ¶
type Bucket struct {
// contains filtered or unexported fields
}
Bucket implements methods for getting and putting s3 objects.
func NewBucket ¶
func NewBucket(accessKeyID, secretAccessKey, region, bucketName string, optionFuncs ...func(*BucketOptions)) (*Bucket, error)
NewBucket returns a new Bucket instance. (It doesn't actually create a new bucket in S3.)
func (*Bucket) PutObject ¶
PutObject puts an object into S3. Because the upstream s3 library wants a ReadSeeker, but we only require callers to provide the more flexible Reader, this function reads the whole body into memory to convert between the two. So don't use this for huge bodies (hundreds of MBs for example).
type BucketOptions ¶
Click to show internal directories.
Click to hide internal directories.