docutil

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2023 License: Apache-2.0 Imports: 5 Imported by: 17

Documentation

Index

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

func GetNamespaceFromID(id string) (string, error)

GetNamespaceFromID returns namespace from ID.

func MarshalCanonical

func MarshalCanonical(v interface{}) ([]byte, error)

MarshalCanonical marshals the object into a canonical JSON format.

func MarshalIndentCanonical

func MarshalIndentCanonical(v interface{}, prefix, indent string) ([]byte, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL