helpers

package
v0.0.0-...-c736a29 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesFromBase64

func BytesFromBase64(str string) []byte

BytesFromBase64 decodes a byte array from a base64 string.

func BytesFromHex

func BytesFromHex(str string) []byte

BytesFromHex decodes a byte array from a hex string.

func BytesToBase64

func BytesToBase64(bytes []byte) string

BytesToBase64 encodes a byte array as a base64 string.

func BytesToHex

func BytesToHex(bytes []byte) string

BytesToHex encodes a byte array as a hex string.

func GetAddressFromPubKey

func GetAddressFromPubKey(pubKey crypto.PubKey) string

GetAddressFromPubKey gets an address from the public key.

func GetCid

func GetCid(content []byte) (string, error)

GetCid gets the content ID.

func Intersection

func Intersection(a, b []string) (c []string)

Intersection computes the intersection of two string slices.

func MarshalMapToJSONBytes

func MarshalMapToJSONBytes(val map[string]interface{}) (bytes []byte)

MarshalMapToJSONBytes converts map[string]interface{} to bytes.

func UnMarshalMapFromJSONBytes

func UnMarshalMapFromJSONBytes(bytes []byte) map[string]interface{}

UnMarshalMapFromJSONBytes converts bytes to map[string]interface{}.

Types

This section is empty.

Jump to

Keyboard shortcuts

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