Documentation ¶
Index ¶
- Constants
- Variables
- func BucketExists(bucketName string) (bool, error)
- func BucketHasContents(bucketName string) (bool, error)
- func CreateBucket(bucketName string) error
- func DeleteObject(bucketName string, key string, version *string) error
- func EmptyBucket(bucketName string) error
- func GetObject(bucketName string, key string) ([]byte, error)
- func GetUnzippedObjectSize(bucketName string, key string) (int64, error)
- func PutObject(bucketName string, key string, body []byte) error
- func RainBucket(forceCreation bool) string
- func Upload(bucketName string, content []byte) (string, error)
- type S3ObjectInfo
Constants ¶
const RAIN_BUCKET_SSM_KEY = "rain-bucket"
Variables ¶
var BucketKeyPrefix = ""
var BucketName = ""
Functions ¶
func BucketExists ¶
BucketExists checks whether the named bucket exists
func BucketHasContents ¶ added in v1.4.0
BucketHasContents returns true if the bucket is not empty
func DeleteObject ¶ added in v1.7.0
DeleteObject deletes an object from a bucket
func EmptyBucket ¶ added in v1.16.0
EmptyBucket deletes all versions of all objects in a bucket
func GetUnzippedObjectSize ¶ added in v1.13.1
GetUnzippedObjectSize gets the uncompressed length in bytes of an object. Calling this on a large object will be slow!
func RainBucket ¶
RainBucket returns the name of the rain deployment bucket in the current region and asks the user if they wish it to be created if it does not exist unless forceCreation is true, then it will not ask. If a blank string is passed in, we look for a parameter store key named "rain-bucket". If that doesn't exist, we use "rain-artifacts-accountid-region". If a non-blank string is passed in, we create that bucket if it doesn't exist.
Types ¶
type S3ObjectInfo ¶ added in v1.13.1
type S3ObjectInfo struct {
SizeBytes int64
}
func HeadObject ¶ added in v1.13.1
func HeadObject(bucketName string, key string) (*S3ObjectInfo, error)
HeadObject gets information about an object without downloading it