bucket

package
v1.16.2 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACLHeader added in v1.8.3

type ACLHeader uint8
const (
	ACLHeaderNone ACLHeader = iota
	ACLHeaderFullControl
	ACLHeaderWrite
	ACLHeaderRead
	ACLHeaderWriteACP
	ACLHeaderReadACP
)

type ACLHeaders added in v1.8.3

type ACLHeaders map[ACLHeader]string

type Bucket

type Bucket interface {
	Check() error

	List() ([]sdkstp.Bucket, error)
	Walk(f WalkFunc) error
	Create(RegionConstraint string) error
	CreateWithLock(RegionConstraint string) error
	Delete() error

	SetVersioning(state bool) error
	GetVersioning() (string, error)

	LoadReplication() (*sdkstp.ReplicationConfiguration, error)
	EnableReplication(srcRoleARN, dstRoleARN, dstBucketName string) error
	DeleteReplication() error

	PutWebsite(index, error string) error
	GetWebsite() (*sdksss.GetBucketWebsiteOutput, error)

	SetCORS(cors []sdkstp.CORSRule) error
	GetCORS() ([]sdkstp.CORSRule, error)

	GetACL() (*sdkstp.AccessControlPolicy, error)
	SetACL(ACP *sdkstp.AccessControlPolicy, cannedACL sdkstp.BucketCannedACL, header ACLHeaders) error
	SetACLPolicy(ACP *sdkstp.AccessControlPolicy) error
	SetACLHeader(cannedACL sdkstp.BucketCannedACL, header ACLHeaders) error

	GetLifeCycle() ([]sdkstp.LifecycleRule, error)
	SetLifeCycle(rules ...sdkstp.LifecycleRule) error
	GetLock() (*sdkstp.ObjectLockConfiguration, error)
	SetLock(cfg sdkstp.ObjectLockConfiguration, token string) error
}

func New

func New(ctx context.Context, bucket, region string, iam *sdkiam.Client, s3 *sdksss.Client) Bucket

type WalkFunc added in v1.9.5

type WalkFunc func(err error, bucket sdkstp.Bucket) error

Jump to

Keyboard shortcuts

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