Documentation ¶
Index ¶
- func ErrCode(msg string, err error) error
- type S3
- func (s *S3) BucketEmpty(ctx context.Context, bucket string) (bool, error)
- func (s *S3) BucketEmptyWithFilter(ctx context.Context, bucket string, max int64, filter func(key *string) bool) (bool, error)
- func (s *S3) BucketExists(ctx context.Context, bucketName string) (bool, error)
- func (s *S3) CreateBucket(ctx context.Context, input *s3.CreateBucketInput) (*s3.CreateBucketOutput, error)
- func (s *S3) CreateObject(ctx context.Context, input *s3.PutObjectInput) (*s3.PutObjectOutput, error)
- func (s *S3) DeleteEmptyBucket(ctx context.Context, input *s3.DeleteBucketInput) error
- func (s *S3) DeleteObject(ctx context.Context, input *s3.DeleteObjectInput) (*s3.DeleteObjectOutput, error)
- func (s *S3) GetBucketLogging(ctx context.Context, bucket string) (*s3.LoggingEnabled, error)
- func (s *S3) GetBucketTags(ctx context.Context, bucket string) ([]*s3.Tag, error)
- func (s *S3) GetObjectTagging(ctx context.Context, input *s3.GetObjectTaggingInput) ([]*s3.Tag, error)
- func (s *S3) ListBuckets(ctx context.Context, input *s3.ListBucketsInput) ([]*s3.Bucket, error)
- func (s *S3) TagBucket(ctx context.Context, bucket string, tags []*s3.Tag) error
- func (s *S3) UpdateBucketEncryption(ctx context.Context, input *s3.PutBucketEncryptionInput) error
- func (s *S3) UpdateBucketLogging(ctx context.Context, bucket, logBucket, logPrefix string) error
- func (s *S3) UpdateBucketPolicy(ctx context.Context, input *s3.PutBucketPolicyInput) error
- func (s *S3) UpdateWebsiteConfig(ctx context.Context, input *s3.PutBucketWebsiteInput) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type S3 ¶
S3 is a wrapper around the aws S3 service with some default config info
func (*S3) BucketEmpty ¶ added in v0.3.0
BucketEmpty lists the objects in a bucket with a max of 1, if there are any objects returned, we return false
func (*S3) BucketEmptyWithFilter ¶ added in v0.11.0
func (s *S3) BucketEmptyWithFilter(ctx context.Context, bucket string, max int64, filter func(key *string) bool) (bool, error)
BucketEmptyWithFilter lists the objects in a bucket with a max of `max`. If the returned object(s) match(es) the filter, we return false
func (*S3) BucketExists ¶ added in v0.2.0
BucketExists checks if a bucket exists
func (*S3) CreateBucket ¶ added in v0.2.0
func (s *S3) CreateBucket(ctx context.Context, input *s3.CreateBucketInput) (*s3.CreateBucketOutput, error)
CreateBucket handles checking if a bucket exists and creating it
func (*S3) CreateObject ¶ added in v0.10.0
func (s *S3) CreateObject(ctx context.Context, input *s3.PutObjectInput) (*s3.PutObjectOutput, error)
CreateObject creates an object in S3
func (*S3) DeleteEmptyBucket ¶ added in v0.2.0
DeleteEmptyBucket handles deleting an empty bucket
func (*S3) DeleteObject ¶ added in v0.11.0
func (s *S3) DeleteObject(ctx context.Context, input *s3.DeleteObjectInput) (*s3.DeleteObjectOutput, error)
DeleteObject deletes an object from S3
func (*S3) GetBucketLogging ¶ added in v0.6.0
GetBucketLogging gets a buckets logging configuration
func (*S3) GetBucketTags ¶ added in v0.2.0
GetBucketTags handles getting the tags for a bucket
func (*S3) GetObjectTagging ¶ added in v0.11.0
func (s *S3) GetObjectTagging(ctx context.Context, input *s3.GetObjectTaggingInput) ([]*s3.Tag, error)
GetObjectTagging gets the tagging data from an object is S3
func (*S3) ListBuckets ¶ added in v0.2.0
ListBuckets handles getting a list of buckets in an account
func (*S3) UpdateBucketEncryption ¶ added in v0.4.0
UpdateBucketEncryption sets the bucket encryption
func (*S3) UpdateBucketLogging ¶ added in v0.5.0
UpdateBucketLogging configures the bucket logging
func (*S3) UpdateBucketPolicy ¶ added in v0.3.0
UpdateBucketPolicy sets a bucket access policy
func (*S3) UpdateWebsiteConfig ¶ added in v0.3.0
UpdateWebsiteConfig sets the configuration for an s3 website, defaults index suffix to index.html