Documentation ¶
Index ¶
- func BucketExists(s3_client *s3.S3, bucket string) bool
- func CreateBucket(s3_client *s3.S3, region string, bucket string) error
- func DeleteObject(s3_client *s3.S3, bucket string, key string) error
- func GetObject(s3_client *s3.S3, bucket string, key string) ([]byte, error)
- func ObjectExists(s3_client *s3.S3, bucket string, key string) bool
- func PutObject(s3_client *s3.S3, bucket string, key string, data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BucketExists ¶
BucketExists checks in a bucket exists in AWS S3 with simplistic error checking
func CreateBucket ¶
CreateBucket creates a bucket in AWS S3 with simplistic error checking
func DeleteObject ¶
DeleteObject deletes a bucket in AWS S3 with simplistic error checking
func GetObject ¶
GetObject retrieves the contents of the object in S3 at the provided bucket and key The contents of the file are read in full. If the key ends in ".gz" or ".bz2", the contents are automatically uncompressed.
func ObjectExists ¶
ObjectExists checks if an object exists in S3 at the given bucket and key, with simplistic error handling. Returns true if the object exists and false if it does not.
func PutObject ¶
PutObject uploads a file to S3 at the given bucket and key If the key ends in ".gz", then the contents are compressed before upload. If the key ends in ".bz2", then errors out as Go does not support writing to bzip2 (see https://github.com/golang/go/issues/4828) Returns an error if any.
Types ¶
This section is empty.