Documentation ¶
Index ¶
- Constants
- func CalculateID(namespace string, value interface{}, hashAlgorithmAsMultihashCode uint) (string, error)
- func GetNamespaceFromID(id string) (string, error)
- func MarshalCanonical(v interface{}) ([]byte, error)
- func MarshalIndentCanonical(v interface{}, prefix, indent string) ([]byte, error)
Constants ¶
View Source
const NamespaceDelimiter = ":"
NamespaceDelimiter is the delimiter that separates the namespace from the unique suffix.
Variables ¶
This section is empty.
Functions ¶
func CalculateID ¶
func CalculateID(namespace string, value interface{}, hashAlgorithmAsMultihashCode uint) (string, error)
CalculateID calculates the ID from model and namespace.
func GetNamespaceFromID ¶ added in v0.1.4
GetNamespaceFromID returns namespace from ID.
func MarshalCanonical ¶
MarshalCanonical marshals the object into a canonical JSON format.
func MarshalIndentCanonical ¶
MarshalIndentCanonical is like MarshalCanonical but applies Indent to format the output. Each JSON element in the output will begin on a new line beginning with prefix followed by one or more copies of indent according to the indentation nesting.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.