Documentation
¶
Overview ¶
Package s3 provides a client to make API requests to Amazon Simple Storage Service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatARN ¶ added in v1.14.0
FormatARN formats an S3 object ARN. For example: arn:aws:s3:::stackset-myapp-infrastru-pipelinebuiltartifactbuc-1nk5t9zkymh8r.s3-us-west-2.amazonaws.com/scripts/dns-cert-validator/dd2278811c3
func MkdirSHA256 ¶ added in v1.14.0
MkdirSHA prefixes the key with the SHA256 hash of the contents of "manual/<hash>/key".
func MkdirTimestamp ¶ added in v1.14.0
MkdirTimestamp prefixes the key with the current timestamp "manual/<timestamp>/key".
func ParseURL ¶ added in v1.5.0
ParseURL parses S3 object URL and returns the bucket name and the key. For example: https://stackset-myapp-infrastru-pipelinebuiltartifactbuc-1nk5t9zkymh8r.s3-us-west-2.amazonaws.com/scripts/dns-cert-validator/dd2278811c3 returns "stackset-myapp-infrastru-pipelinebuiltartifactbuc-1nk5t9zkymh8r" and "scripts/dns-cert-validator/dd2278811c3"
Types ¶
type CompressAndUploadFunc ¶ added in v1.4.0
type CompressAndUploadFunc func(key string, objects ...NamedBinary) (url string, err error)
CompressAndUploadFunc is invoked to zip multiple template contents and upload them to an S3 bucket under the specified key.
type NamedBinary ¶ added in v1.4.0
NamedBinary is a named binary to be uploaded.
type S3 ¶
type S3 struct {
// contains filtered or unexported fields
}
S3 wraps an Amazon Simple Storage Service client.
func (*S3) EmptyBucket ¶
EmptyBucket deletes all objects within the bucket.
func (*S3) ZipAndUpload ¶ added in v1.4.0
func (s *S3) ZipAndUpload(bucket, key string, files ...NamedBinary) (string, error)
ZipAndUpload zips all files and uploads the zipped file to an S3 bucket under the specified key.