common

package
v1.3.11 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	StatusIndexMap = map[Status]string{
		ObjectNeedRestore: "READY",
		ObjectRestoring:   "RESTORING",
		ObjectHasRestored: "FINISH",
	}

	StatusStringMap = map[string]Status{
		"READY":     ObjectNeedRestore,
		"RESTORING": ObjectRestoring,
		"FINISH":    ObjectHasRestored,
	}
)
View Source
var XXTEA_KEY = []byte("hehehehe")

Functions

func Decrypt

func Decrypt(value string) (string, error)

func Encrypt

func Encrypt(value string) string

Types

type Status added in v1.3.9

type Status uint8
const (
	ObjectNeedRestore Status = iota
	ObjectRestoring
	ObjectHasRestored
)

func MatchStatusIndex

func MatchStatusIndex(status string) (Status, error)

func (Status) ToString added in v1.3.9

func (s Status) ToString() string

type StorageClass

type StorageClass uint8
const (
	// ObjectStorageClassStandard is a ObjectStorageClass enum value
	ObjectStorageClassStandard StorageClass = iota

	// ObjectStorageClassReducedRedundancy is a ObjectStorageClass enum value
	ObjectStorageClassReducedRedundancy

	// ObjectStorageClassGlacier is a ObjectStorageClass enum value
	ObjectStorageClassGlacier

	// ObjectStorageClassStandardIa is a ObjectStorageClass enum value
	ObjectStorageClassStandardIa

	// ObjectStorageClassOnezoneIa is a ObjectStorageClass enum value
	ObjectStorageClassOnezoneIa

	// ObjectStorageClassIntelligentTiering is a ObjectStorageClass enum value
	ObjectStorageClassIntelligentTiering

	// ObjectStorageClassIntelligentTiering is a ObjectStorageClass enum value
	ObjectStorageClassDeepArchive
)

Reference:https://docs.aws.amazon.com/zh_cn/AmazonS3/latest/dev/storage-class-intro.html

func MatchStorageClassIndex

func MatchStorageClassIndex(storageClass string) (StorageClass, error)

func (StorageClass) ToString

func (s StorageClass) ToString() string

Jump to

Keyboard shortcuts

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