Documentation ¶
Index ¶
- Constants
- type MetadataAddress
- func MetadataAddressForContractSpecification(contractSpecUUID uuid.UUID) MetadataAddress
- func MetadataAddressForRecord(scopeUUID uuid.UUID, recordName string) MetadataAddress
- func MetadataAddressForRecordSpecification(contractSpecUUID uuid.UUID, recordSpecName string) MetadataAddress
- func MetadataAddressForScope(scopeUUID uuid.UUID) MetadataAddress
- func MetadataAddressForScopeSpecification(scopeSpecUUID uuid.UUID) MetadataAddress
- func MetadataAddressForSession(scopeUUID uuid.UUID, sessionUUID uuid.UUID) MetadataAddress
- func MetadataAddressFromBech32(address string) (MetadataAddress, error)
- func MetadataAddressFromBytes(bz []byte) (MetadataAddress, error)
- func (m MetadataAddress) Bytes() []byte
- func (m MetadataAddress) Equals(m2 MetadataAddress) bool
- func (m MetadataAddress) Format(s fmt.State, verb rune)
- func (m MetadataAddress) GetKey() byte
- func (m MetadataAddress) GetPrefix() string
- func (m MetadataAddress) GetPrimaryUUID() uuid.UUID
- func (m MetadataAddress) GetSecondaryBytes() []byte
- func (m MetadataAddress) String() string
Constants ¶
const ( PrefixScope = "scope" PrefixSession = "session" PrefixRecord = "record" PrefixScopeSpecification = "scopespec" PrefixContractSpecification = "contractspec" PrefixRecordSpecification = "recspec" KeyScope = byte(0x00) KeySession = byte(0x01) KeyRecord = byte(0x02) KeyScopeSpecification = byte(0x04) // Note that this is not in numerical order. KeyContractSpecification = byte(0x03) KeyRecordSpecification = byte(0x05) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetadataAddress ¶
type MetadataAddress []byte
MetadataAddress is a type that helps create ids for the various types objects stored by the metadata module.
func MetadataAddressForContractSpecification ¶
func MetadataAddressForContractSpecification(contractSpecUUID uuid.UUID) MetadataAddress
MetadataAddressForContractSpecification creates a MetadataAddress instance for a contract specification
func MetadataAddressForRecord ¶
func MetadataAddressForRecord(scopeUUID uuid.UUID, recordName string) MetadataAddress
MetadataAddressForRecord creates a MetadataAddress instance for a record within a scope by scope uuid/record name
func MetadataAddressForRecordSpecification ¶
func MetadataAddressForRecordSpecification(contractSpecUUID uuid.UUID, recordSpecName string) MetadataAddress
MetadataAddressForRecordSpecification creates a MetadataAddress instance for a record specification
func MetadataAddressForScope ¶
func MetadataAddressForScope(scopeUUID uuid.UUID) MetadataAddress
MetadataAddressForScope creates a MetadataAddress instance for the given scope by its uuid
func MetadataAddressForScopeSpecification ¶
func MetadataAddressForScopeSpecification(scopeSpecUUID uuid.UUID) MetadataAddress
MetadataAddressForScopeSpecification creates a MetadataAddress instance for a scope specification
func MetadataAddressForSession ¶
func MetadataAddressForSession(scopeUUID uuid.UUID, sessionUUID uuid.UUID) MetadataAddress
MetadataAddressForSession creates a MetadataAddress instance for a session within a scope by uuids
func MetadataAddressFromBech32 ¶
func MetadataAddressFromBech32(address string) (MetadataAddress, error)
MetadataAddressFromBech32 creates a MetadataAddress from a Bech32 string. The encoded data is checked against the provided bech32 hrp along with an overall verification of the byte format.
func MetadataAddressFromBytes ¶
func MetadataAddressFromBytes(bz []byte) (MetadataAddress, error)
func (MetadataAddress) Bytes ¶
func (m MetadataAddress) Bytes() []byte
Bytes gets all the bytes of this MetadataAddress.
func (MetadataAddress) Equals ¶
func (m MetadataAddress) Equals(m2 MetadataAddress) bool
Equals implementation for comparing MetadataAddress values.
func (MetadataAddress) Format ¶
func (m MetadataAddress) Format(s fmt.State, verb rune)
Format implements fmt.Format interface %s formats as bech32 address string (same as m.String()). %p formats as the address of 0th element in base 16 notation, with leading 0x. all others format as base 16, upper-case, two characters per byte.
func (MetadataAddress) GetKey ¶
func (m MetadataAddress) GetKey() byte
GetKey gets the key byte for this MetadataAddress.
func (MetadataAddress) GetPrefix ¶
func (m MetadataAddress) GetPrefix() string
GetPrefix gets the prefix string for this MetadataAddress, e.g. "scope".
func (MetadataAddress) GetPrimaryUUID ¶
func (m MetadataAddress) GetPrimaryUUID() uuid.UUID
GetPrimaryUUID gets the set of bytes for the primary uuid part of this MetadataAddress as a UUID.
func (MetadataAddress) GetSecondaryBytes ¶
func (m MetadataAddress) GetSecondaryBytes() []byte
GetSecondaryBytes gets a copy of the bytes that make up the secondary part of this MetadataAddress.
func (MetadataAddress) String ¶
func (m MetadataAddress) String() string
String implements the stringer interface and encodes as a bech32.