feat: add type maps
This commit is contained in:
parent
8b25f9d349
commit
208f50324a
11
types/cid.go
11
types/cid.go
|
@ -12,3 +12,14 @@ const (
|
||||||
CIDTypeEncryptedStatic CIDType = 0xae
|
CIDTypeEncryptedStatic CIDType = 0xae
|
||||||
CIDTypeEncryptedDynamic CIDType = 0xad
|
CIDTypeEncryptedDynamic CIDType = 0xad
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var CIDTypeMap = map[CIDType]string{
|
||||||
|
CIDTypeRaw: "Raw",
|
||||||
|
CIDTypeMetadataMedia: "MetadataMedia",
|
||||||
|
CIDTypeMetadataWebapp: "MetadataWebapp",
|
||||||
|
CIDTypeResolver: "Resolver",
|
||||||
|
CIDTypeUserIdentity: "UserIdentity",
|
||||||
|
CIDTypeBridge: "Bridge",
|
||||||
|
CIDTypeEncryptedStatic: "EncryptedStatic",
|
||||||
|
CIDTypeEncryptedDynamic: "EncryptedDynamic",
|
||||||
|
}
|
||||||
|
|
|
@ -6,3 +6,8 @@ const (
|
||||||
HashTypeBlake3 HashType = 0x1f
|
HashTypeBlake3 HashType = 0x1f
|
||||||
HashTypeEd25519 HashType = 0xed
|
HashTypeEd25519 HashType = 0xed
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var HashTypeMap = map[HashType]string{
|
||||||
|
HashTypeBlake3: "Blake3",
|
||||||
|
HashTypeEd25519: "Ed25519",
|
||||||
|
}
|
||||||
|
|
|
@ -6,3 +6,8 @@ const (
|
||||||
RegistryTypeCID RegistryType = 0x5a
|
RegistryTypeCID RegistryType = 0x5a
|
||||||
RegistryTypeEncryptedCID RegistryType = 0x5e
|
RegistryTypeEncryptedCID RegistryType = 0x5e
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var RegistryTypeMap = map[RegistryType]string{
|
||||||
|
RegistryTypeCID: "CID",
|
||||||
|
RegistryTypeEncryptedCID: "EncryptedCID",
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue