utils

package
Version: v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2019 License: Apache-2.0 Imports: 0 Imported by: 0

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"
)

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 {
	StorType   string //aws-s3,azure-blob,hw-obs,ceph-s3 etc.
	Region     string
	EndPoint   string
	BucketName string //remote bucket name
	VirBucket  string //local bucket name
	Access     string
	Security   string
	BakendName string
	ClassName  string
}

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
	ChangeStorageClass(objKey *string, newClass *string, bkend *BackendInfo) error
}

Jump to

Keyboard shortcuts

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