s3

package
v0.0.0-...-a93c916 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	BucketTopic     = "bkt"
	ZeroResultsList = "list-buckets returned 0 results"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

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

Bucket represents the S3 Bucket CloudObject

func NewBucket

func NewBucket(name string, session client.ConfigProvider) (*Bucket, error)

NewInstance returns a new S3 Bucket object

func (*Bucket) Create

func (*Bucket) Delete

func (b *Bucket) Delete(_ bool) error

Delete deletes the bucket. Purge has no effect, bucket will always be purged.

func (*Bucket) Exists

func (b *Bucket) Exists() (bool, error)

func (*Bucket) ID

func (b *Bucket) ID() cloudobject.ID

func (*Bucket) Read

func (b *Bucket) Read() error

func (*Bucket) Status

func (b *Bucket) Status() cloudobject.Status

func (*Bucket) Update

type BucketSecrets

type BucketSecrets struct{}

func (BucketSecrets) Map

func (secrets BucketSecrets) Map() map[string]string

type BucketSpec

type BucketSpec struct {

	// The Location to create the bucket in. Defaults to us-east-1.
	Location string

	// The canned ACL to apply to the bucket. (e.g. "private", "public-read", "public-read-write", "authenticated-read")
	ACL string

	// ObjectLock enables object locking capabilities on the bucket
	ObjectLock bool

	// Enables object versioning capabilities on the bucket
	Versioning bool

	// TransferAcceleration enables transfer acceleration capabilities on the bucket
	TransferAcceleration bool

	// Acl restrictions
	BlockPublicAcls  bool
	IgnorePublicAcls bool

	// Policy restrictions
	BlockPublicPolicy     bool
	RestrictPublicBuckets bool
}

func SaneS3Bucket

func SaneS3Bucket() BucketSpec

Returns a "sane" defaulted BucketSpec

func (BucketSpec) CreateBucketInput

func (b BucketSpec) CreateBucketInput(id string) awss3.CreateBucketInput

func (BucketSpec) PutBucketAccelerationInput

func (b BucketSpec) PutBucketAccelerationInput(id string) awss3.PutBucketAccelerateConfigurationInput

func (BucketSpec) PutBucketAclInput

func (b BucketSpec) PutBucketAclInput(id string) awss3.PutBucketAclInput

func (BucketSpec) PutBucketEncryptionInput

func (b BucketSpec) PutBucketEncryptionInput(id string, key *kms.Key) awss3.PutBucketEncryptionInput

func (BucketSpec) PutBucketVersioningInput

func (b BucketSpec) PutBucketVersioningInput(id string) awss3.PutBucketVersioningInput

func (BucketSpec) PutPublicAccessBlockInput

func (b BucketSpec) PutPublicAccessBlockInput(id string) awss3.PutPublicAccessBlockInput

func (*BucketSpec) Valid

func (b *BucketSpec) Valid() (bool, error)

type BucketStatus

type BucketStatus struct {
	awss3.Bucket
	Encrypted bool
	ARN       string
}

func (BucketStatus) ProviderID

func (status BucketStatus) ProviderID() cloudobject.ProviderID

func (BucketStatus) String

func (status BucketStatus) String() string

type GrantsSpec

type GrantsSpec struct {

	// User will have full access to the bucket incl ACL privileges
	FullAccess []string

	// User will have write access to the bucket
	WriteAccess []string

	// User will have read access to the bucket
	ReadAccess []string

	// User will be allowed to write the ACL
	ACLWriteAccess []string

	// User will be allowed to read the ACL
	ACLReadAccess []string
}

Jump to

Keyboard shortcuts

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