object

package
v1.10.4 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPartSize = 5 * libhlp.SizeMegaBytes

Variables

This section is empty.

Functions

This section is empty.

Types

type DelMakWalkFunc added in v1.9.5

type DelMakWalkFunc func(err liberr.Error, del sdktps.DeleteMarkerEntry) liberr.Error

type Object

type Object interface {
	Find(regex string) ([]string, liberr.Error)
	Size(object string) (size int64, err liberr.Error)

	List(continuationToken string) ([]sdktps.Object, string, int64, liberr.Error)
	Walk(f WalkFunc) liberr.Error

	ListPrefix(continuationToken string, prefix string) ([]sdktps.Object, string, int64, liberr.Error)
	WalkPrefix(prefix string, f WalkFunc) liberr.Error

	Head(object string) (*sdksss.HeadObjectOutput, liberr.Error)
	Get(object string) (*sdksss.GetObjectOutput, liberr.Error)
	Put(object string, body io.Reader) liberr.Error
	Delete(check bool, object string) liberr.Error
	DeleteAll(objects *sdktps.Delete) ([]sdktps.DeletedObject, liberr.Error)
	GetAttributes(object, version string) (*sdksss.GetObjectAttributesOutput, liberr.Error)

	MultipartList(keyMarker, markerId string) (uploads []sdktps.MultipartUpload, nextKeyMarker string, nextIdMarker string, count int64, e liberr.Error)
	MultipartPut(object string, body io.Reader) liberr.Error
	MultipartPutCustom(partSize libhlp.PartSize, object string, body io.Reader) liberr.Error
	MultipartCancel(uploadId, key string) liberr.Error

	UpdateMetadata(meta *sdksss.CopyObjectInput) liberr.Error
	SetWebsite(object, redirect string) liberr.Error

	VersionList(prefix, keyMarker, markerId string) (version []sdktps.ObjectVersion, delMarker []sdktps.DeleteMarkerEntry, nextKeyMarker, nextMarkerId string, count int64, err liberr.Error)
	VersionWalk(fv VersionWalkFunc, fd DelMakWalkFunc) liberr.Error
	VersionWalkPrefix(prefix string, fv VersionWalkFunc, fd DelMakWalkFunc) liberr.Error

	VersionGet(object, version string) (*sdksss.GetObjectOutput, liberr.Error)
	VersionHead(object, version string) (*sdksss.HeadObjectOutput, liberr.Error)
	VersionSize(object, version string) (size int64, err liberr.Error)
	VersionDelete(check bool, object, version string) liberr.Error

	GetRetention(object, version string) (until time.Time, mode string, err liberr.Error)
	SetRetention(object, version string, bypass bool, until time.Time, mode string) liberr.Error
	GetLegalHold(object, version string) (sdktps.ObjectLockLegalHoldStatus, liberr.Error)
	SetLegalHold(object, version string, flag sdktps.ObjectLockLegalHoldStatus) liberr.Error

	GetTags(object, version string) ([]sdktps.Tag, liberr.Error)
	SetTags(object, version string, tags ...sdktps.Tag) liberr.Error
}

func New

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

type VersionWalkFunc added in v1.9.5

type VersionWalkFunc func(err liberr.Error, obj sdktps.ObjectVersion) liberr.Error

type WalkFunc added in v1.9.5

type WalkFunc func(err liberr.Error, obj sdktps.Object) liberr.Error

Jump to

Keyboard shortcuts

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