Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBucketDoesNotExist = errors.New("s3 bucket does not exist")
)

Functions

This section is empty.

Types

type Bucket

type Bucket interface {
	Describe(bucketName, partition string) (BucketDetails, error)
	Create(bucketName string, details BucketDetails) (string, error)
	Modify(bucketName string, details BucketDetails) error
	Delete(bucketName string, deleteObjects bool) error
}

type BucketDetails

type BucketDetails struct {
	BucketName   string
	ARN          string
	Region       string
	Policy       string
	Encryption   string
	AwsPartition string
	Tags         map[string]string
	FIPSEndpoint string
}

type S3Bucket

type S3Bucket struct {
	// contains filtered or unexported fields
}

func NewS3Bucket

func NewS3Bucket(
	s3svc *s3.S3,
	logger lager.Logger,
) *S3Bucket

func (*S3Bucket) Create

func (s *S3Bucket) Create(bucketName string, bucketDetails BucketDetails) (string, error)

func (*S3Bucket) Delete

func (s *S3Bucket) Delete(bucketName string, deleteObjects bool) error

func (*S3Bucket) Describe

func (s *S3Bucket) Describe(bucketName, partition string) (BucketDetails, error)

func (*S3Bucket) Modify

func (s *S3Bucket) Modify(bucketName string, bucketDetails BucketDetails) error