bucket

package
v1.10.5 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: MIT Imports: 8 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() liberr.Error

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

	SetVersioning(state bool) liberr.Error
	GetVersioning() (string, liberr.Error)

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

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

	SetCORS(cors []sdkstp.CORSRule) liberr.Error
	GetCORS() ([]sdkstp.CORSRule, liberr.Error)

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

	GetLifeCycle() ([]sdkstp.LifecycleRule, liberr.Error)
	SetLifeCycle(rules ...sdkstp.LifecycleRule) liberr.Error
	GetLock() (*sdkstp.ObjectLockConfiguration, liberr.Error)
	SetLock(cfg sdkstp.ObjectLockConfiguration, token string) liberr.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 liberr.Error, bucket sdkstp.Bucket) liberr.Error

Jump to

Keyboard shortcuts

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