Documentation ¶
Index ¶
- func AppendUnique(list []string, element string) []string
- func CIDFromJSONBytes(content []byte) (string, error)
- func CIDFromJSONBytesUsingIpldPrime(content []byte) (string, error)
- func GenerateHash(json map[string]interface{}) (string, []byte, error)
- func GenerateMnemonic() (string, error)
- func GetAttributeAsString(obj map[string]interface{}, attr string) (string, error)
- func Int64ToBytes(num int64) ([]byte, error)
- func SetToSlice(set set.Set) []string
- func SliceToSet(names []string) set.Set
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendUnique ¶
func CIDFromJSONBytes ¶
CIDFromJSONBytes returns CID (cbor) for json (as bytes).
func CIDFromJSONBytesUsingIpldPrime ¶
CIDFromJSONBytesUsingIpldPrime returns CID (dagcbor) for json (as bytes). This is combination of samples for unmarshalling and linking see: https://pkg.go.dev/github.com/ipld/go-ipld-prime
func GenerateHash ¶
GenerateHash returns the hash of the canonicalized JSON input.
func GenerateMnemonic ¶
func GetAttributeAsString ¶
GetAttributeAsString returns a map attribute as string, if possible.
func Int64ToBytes ¶
func SetToSlice ¶
func SliceToSet ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.