All checks were successful
Vulncheck / Vulncheck (push) Successful in 1m15s
Pre-commit hooks / Pre-commit (push) Successful in 1m39s
Build / Build Components (push) Successful in 2m5s
Tests and linters / Run gofumpt (push) Successful in 2m46s
Tests and linters / Lint (push) Successful in 3m13s
Tests and linters / Staticcheck (push) Successful in 3m13s
Tests and linters / Tests (push) Successful in 3m23s
Tests and linters / Tests with -race (push) Successful in 3m40s
Tests and linters / gopls check (push) Successful in 3m52s
OCI image / Build container images (push) Successful in 4m34s
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
57 lines
1.2 KiB
Go
57 lines
1.2 KiB
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
|
|
ExpirationEpochToObject
|
|
ObjectToExpirationEpoch
|
|
)
|
|
|
|
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",
|
|
ExpirationEpochToObject: "Exp. Epoch to Object",
|
|
ObjectToExpirationEpoch: "Object to Exp. Epoch",
|
|
}
|
|
|
|
func (p Prefix) String() string {
|
|
if s, ok := x[p]; ok {
|
|
return s
|
|
}
|
|
return "Unknown Prefix"
|
|
}
|