utils

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Tier1   = 1
	Tier99  = 99
	Tier999 = 999
)

Tier1, Tier99 and Tier999 just like the tiers of hot, warm, cold. In the future, we will provide the ability for users to add new storage tiers, if we use 1, 2 and 3, then no space for new storage tiers.

View Source
const (
	AWS_STANDARD    = "STANDARD"
	AWS_STANDARD_IA = "STANDARD_IA"
	AWS_GLACIER     = "GLACIER"
)
View Source
const (
	GCS_MULTI_REGIONAL = "MULTI_REGIONAL"
	GCS_REGIONAL       = "REGIONAL"
	GCS_NEARLINE       = "NEARLINE"
	GCS_COLDLINE       = "COLDLINE"
)
View Source
const (
	OSTYPE_OPENSDS       = "OpenSDS"
	OSTYPE_AWS           = "aws-s3"
	OSTYPE_Azure         = "azure-blob"
	OSTYPE_OBS           = "hw-obs"
	OSTYPE_GCS           = "gcp-s3"
	OSTYPE_CEPH          = "ceph-s3"
	OSTYPE_FUSIONSTORAGE = "fusionstorage-object"
)

Object Storage Type

View Source
const (
	DBKEY_DELETEMARKER   = "isdeletemarker"
	DBKEY_INITFLAG       = "initflag"
	DBKEY_OBJECTKEY      = "objectkey"
	DBKEY_UPLOADID       = "uploadid"
	DBKEY_LASTMODIFIED   = "lastmodified"
	DBKEY_SUPPOSEDSTATUS = "supposedstatus"
	DBKEY_LOCKOBJ_OBJKEY = "objkey"
	DBKEY_BUCKET         = "bucket"
	DBKEY_INITTIME       = "inittime"
	DBKEY_NAME           = "name"
	DBKEY_LIFECYCLE      = "lifecycleconfiguration"
	DBKEY_ID             = "id"
)
View Source
const (
	MaxObjectList  = 1000 // Limit number of objects in a listObjectsResponse.
	MaxUploadsList = 1000 // Limit number of uploads in a listUploadsResponse.
	MaxPartsList   = 1000 // Limit number of parts in a listPartsResponse.
)
View Source
const (
	VersioningEnabled   = "Enabled"
	VersioningDisabled  = "Disabled"
	VersioningSuspended = "Suspended"
)
View Source
const (
	MoveType_Invalid = iota
	MoveType_MoveCrossBuckets
	MoveType_ChangeLocation
	MoveType_ChangeStorageTier
)
View Source
const (
	CEPH_STANDARD = "STDANDARD"
)
View Source
const (
	RequestType_Lifecycle = "lifecycle"
)

Variables

This section is empty.

Functions

func DecryptWithAES256 added in v0.7.0

func DecryptWithAES256(data []byte, key []byte) (error, []byte)

func EncryptWithAES256RandomKey added in v0.7.0

func EncryptWithAES256RandomKey(data []byte, key []byte) (error, []byte)

func GetBackend added in v0.6.3

func GetBackend(ctx context.Context, backedClient backend.BackendService, backendName string) (*backend.BackendDetail,
	error)

func GetRandom32BitKey added in v0.7.0

func GetRandom32BitKey() ([]byte, error)

func Md5Content added in v0.6.3

func Md5Content(data []byte) (base64Encoded, hexEncoded string)

func SetRepresentTenant added in v0.9.0

func SetRepresentTenant(ctx context.Context, requestTenant, sourceTenant string) context.Context

Types

type Database

type Database struct {
	Credential string `conf:"credential,username:password@tcp(ip:port)/dbname"`
	Driver     string `conf:"driver,mongodb"`
	Endpoint   string `conf:"endpoint,localhost:27017"`
}

type ListObjsAppendInfo added in v0.6.3

type ListObjsAppendInfo struct {
	Prefixes   []string
	Truncated  bool
	NextMarker string
}

type ObjsCountInfo added in v0.5.4

type ObjsCountInfo struct {
	Size  int64
	Count int64
}

Jump to

Keyboard shortcuts

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