53 lines
966 B
Go
53 lines
966 B
Go
package buckets
|
|
|
|
type Prefix byte
|
|
|
|
const (
|
|
Graveyard Prefix = iota
|
|
Garbage
|
|
ToMoveIt
|
|
ContainerVolume
|
|
Locked
|
|
ShardInfo
|
|
Primary
|
|
Lockers
|
|
_
|
|
Tombstone
|
|
Small
|
|
Root
|
|
Owner
|
|
UserAttribute
|
|
PayloadHash
|
|
Parent
|
|
Split
|
|
ContainerCounters
|
|
ECInfo
|
|
)
|
|
|
|
var x = map[Prefix]string{
|
|
Graveyard: "Graveyard",
|
|
Garbage: "Garbage",
|
|
ToMoveIt: "To Move It",
|
|
ContainerVolume: "Container Volume",
|
|
Locked: "Locked",
|
|
ShardInfo: "Shard Info",
|
|
Primary: "Primary",
|
|
Lockers: "Lockers",
|
|
Tombstone: "Tombstone",
|
|
Small: "Small",
|
|
Root: "Root",
|
|
Owner: "Owner",
|
|
UserAttribute: "User Attribute",
|
|
PayloadHash: "Payload Hash",
|
|
Parent: "Parent",
|
|
Split: "Split",
|
|
ContainerCounters: "Container Counters",
|
|
ECInfo: "EC Info",
|
|
}
|
|
|
|
func (p Prefix) String() string {
|
|
if s, ok := x[p]; ok {
|
|
return s
|
|
}
|
|
return "Unknown Prefix"
|
|
}
|