s3

package
v0.3.2-dev03 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyValuePair

type KeyValuePair struct {
	Key   string
	Value string
}

KeyValuePair maps a key to a value

type S3

type S3 struct {
	Service s3iface.S3API
}

S3 is a wrapper around the aws S3 service with some default config info

func NewSession

func NewSession(account common.Account) S3

NewSession creates a new S3 session

func (*S3) BucketEmpty added in v0.3.0

func (s *S3) BucketEmpty(ctx context.Context, bucket string) (bool, error)

BucketEmpty lists the objects in a bucket with a max of 1, if there are any objects returned, we return false

func (*S3) BucketExists added in v0.2.0

func (s *S3) BucketExists(ctx context.Context, bucketName string) (bool, error)

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) DeleteEmptyBucket added in v0.2.0

func (s *S3) DeleteEmptyBucket(ctx context.Context, input *s3.DeleteBucketInput) (*s3.DeleteBucketOutput, error)

DeleteEmptyBucket handles deleting an empty bucket

func (*S3) GetBucketTags added in v0.2.0

func (s *S3) GetBucketTags(ctx context.Context, bucket string) ([]*s3.Tag, error)

GetBucketTags handles getting the tags for a bucket

func (*S3) ListBuckets added in v0.2.0

func (s *S3) ListBuckets(ctx context.Context, input *s3.ListBucketsInput) ([]*s3.Bucket, error)

ListBuckets handles getting a list of buckets in an account

func (*S3) TagBucket added in v0.2.0

func (s *S3) TagBucket(ctx context.Context, bucket string, tags []*s3.Tag) error

TagBucket adds tags to a bucket

func (*S3) UpdateBucketPolicy added in v0.3.0

func (s *S3) UpdateBucketPolicy(ctx context.Context, input *s3.PutBucketPolicyInput) error

UpdateBucketPolicy sets a bucket access policy

func (*S3) UpdateWebsiteConfig added in v0.3.0

func (s *S3) UpdateWebsiteConfig(ctx context.Context, input *s3.PutBucketWebsiteInput) error

UpdateWebsiteConfig sets the configuration for an s3 website, defaults index suffix to index.html

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL