feat: add type maps

This commit is contained in:
Derrick Hammer 2024-01-03 03:57:39 -05:00
parent 8b25f9d349
commit 208f50324a
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
3 changed files with 21 additions and 0 deletions

View File

@ -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",
}

View File

@ -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",
}

View File

@ -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",
}