utils

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: May 20, 2022 License: Apache-2.0 Imports: 0 Imported by: 10

Documentation

Index

Constants

View Source
const (
	OBJMETA_TIER    = "tier"
	OBJMETA_BACKEND = "backend"
)
View Source
const (
	DMERR_Success               = "success"
	DMERR_NoPermission          = "permissionDenied"
	DMERR_InternalError         = "internalError"
	DMERR_UnSupportBackendType  = "unsupport backend type"
	DMERR_UnSupportStorageClass = "unsupport storage class"
	DMERR_UnSupportOperation    = "unsupport operation"
	DMERR_NoSuchKey             = "noSuchkey"
	DMERR_NoSuchUpload          = "noSuchUpload"
	DMERR_TransitionInprogress  = "transition in-progress"
	DMERR_BucketNotFound        = "bucket not found"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendInfo added in v0.5.3

type BackendInfo struct {
	StorType   string // aws-s3,azure-blob,hw-obs,ceph-s3 etc.
	Region     string
	EndPoint   string
	BucketName string // remote bucket name
	Access     string
	Security   string
	BakendName string
}

type GetMultipartUploadRequest added in v0.5.3

type GetMultipartUploadRequest struct {
	Bucket string
	Prefix string
	Days   int32
}

type LocationInfo

type LocationInfo struct {
	BucketName string // bucket name
	BakendName string
	ClassName  string
	Tier       int32
}

type MoveWorker

type MoveWorker interface {
	DownloadObj(objKey string, srcLoca *LocationInfo, buf []byte) (size int64, err error)
	UploadObj(objKey string, destLoca *LocationInfo, buf []byte) error
	DeleteObj(objKey string, loca *LocationInfo) error
	MultiPartDownloadInit(srcLoca *LocationInfo) error
	DownloadRange(objKey string, srcLoca *LocationInfo, buf []byte, start int64, end int64) (size int64, err error)
	MultiPartUploadInit(objKey string, destLoca *LocationInfo) (uploadId string, err error)
	UploadPart(objKey string, destLoca *LocationInfo, upBytes int64, buf []byte, partNumber int64, offset int64) error
	AbortMultipartUpload(objKey string, destLoca *LocationInfo) error
	CompleteMultipartUpload(objKey string, destLoca *LocationInfo) error
}

Jump to

Keyboard shortcuts

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