Documentation
¶
Index ¶
Constants ¶
View Source
const ( IDENTITY = 0x00 JSON = 0x11 )
constants
Variables ¶
View Source
var ( ErrUnknownType = errors.New("multischema type not supported yet") ErrSchemaNotConfrontedToValidator = errors.New("schema not confronted to validator") )
errors
View Source
var CodeToTypeMap = map[byte]string{ IDENTITY: "identity", JSON: "json", }
CodeToTypeMap maps a hash code to it's type
View Source
var TypeToCodeMap = map[string]byte{ "identity": IDENTITY, "json": JSON, }
TypeToCodeMap maps the type of a hash to the code
Functions ¶
func EncodePayloadToMultiHash ¶
EncodePayloadToMultiHash returns payload encoded with sha3 in MultiHash format
Types ¶
type SchemaId ¶
type SchemaId []byte
func EncodeToSchemaId ¶
EncodeToSchemaId returns SchemaHash in the format of <SchemaCode 1 byte><Multihash>
func SchemaIdFromHexString ¶
Click to show internal directories.
Click to hide internal directories.