Documentation ¶
Index ¶
Constants ¶
View Source
const ( MinStandardIaObjectSize int64 = 1 << 16 // 64KB MinGlacierObjectSize int64 = 1 << 16 // 64KB )
Variables ¶
View Source
var ( StatusIndexMap = map[RestoreStatus]string{ ObjectNeedRestore: "READY", ObjectRestoring: "RESTORING", ObjectHasRestored: "FINISH", } StatusStringMap = map[string]RestoreStatus{ "READY": ObjectNeedRestore, "RESTORING": ObjectRestoring, "FINISH": ObjectHasRestored, } )
View Source
var ( StorageClassIndexMap = map[StorageClass]string{ ObjectStorageClassStandard: "STANDARD", ObjectStorageClassStandardIa: "STANDARD_IA", ObjectStorageClassIntelligentTiering: "INTELLIGENT_TIERING", ObjectStorageClassOnezoneIa: "ONEZONE_IA", ObjectStorageClassGlacier: "GLACIER", ObjectStorageClassDeepArchive: "DEEP_ARCHIVE", ObjectStorageClassReducedRedundancy: "RRS", } StorageClassStringMap = map[string]StorageClass{ "STANDARD": ObjectStorageClassStandard, "STANDARD_IA": ObjectStorageClassStandardIa, "INTELLIGENT_TIERING": ObjectStorageClassIntelligentTiering, "ONEZONE_IA": ObjectStorageClassOnezoneIa, "GLACIER": ObjectStorageClassGlacier, "DEEP_ARCHIVE": ObjectStorageClassDeepArchive, "RRS": ObjectStorageClassReducedRedundancy, } StorageClassWeight = map[StorageClass]int{ ObjectStorageClassStandard: 1, ObjectStorageClassStandardIa: 2, ObjectStorageClassIntelligentTiering: 3, ObjectStorageClassOnezoneIa: 4, ObjectStorageClassGlacier: 5, ObjectStorageClassDeepArchive: 6, ObjectStorageClassReducedRedundancy: 1, } )
View Source
var XXTEA_KEY = []byte("hehehehe")
Functions ¶
func CorrectDeltaSize ¶
func CorrectDeltaSize(storageClass StorageClass, deltaSize int64) (delta int64)
For billing now. FIXME later?
Types ¶
type RestoreStatus ¶
type RestoreStatus uint8
const ( ObjectNeedRestore RestoreStatus = iota ObjectRestoring ObjectHasRestored )
func MatchStatusIndex ¶
func MatchStatusIndex(status string) (RestoreStatus, error)
func (RestoreStatus) ToString ¶
func (s RestoreStatus) 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
type UnexpiredTriple ¶
type UnexpiredTriple struct { StorageClass StorageClass Size int64 SurvivalTime int64 //Nano seconds }
Click to show internal directories.
Click to hide internal directories.