utils

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: AGPL-3.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MASK_V8 = [16]byte{0, 0, 0, 0, 0, 0, 128, 0, 128, 0, 0, 0, 0, 0, 0, 0}

Functions

func AddressToHex added in v0.4.0

func AddressToHex(a []byte) string

func AnonymizeUUID

func AnonymizeUUID(userId umid.UMID) string

func BinID

func BinID(id umid.UMID) []byte

func GetFromAny

func GetFromAny[V any](val any, defaultValue V) V

func GetFromAnyMap

func GetFromAnyMap[K comparable, V any](amap map[K]any, key K, defaultValue V) V

func GetKeyByValueFromMap

func GetKeyByValueFromMap[K comparable, V comparable](m map[K]V, val V) (K, bool)

func GetPTR

func GetPTR[T any](v T) *T

func GoroutineID

func GoroutineID() int

func HexToAddress added in v0.4.0

func HexToAddress(s string) []byte

func MapDecode

func MapDecode(input, output interface{}) error

func MapEncode added in v0.4.0

func MapEncode(input, output interface{}) error

func MergeMaps

func MergeMaps[K comparable, V any](m1, m2 map[K]V) map[K]V

func SEQtoUMID added in v0.4.0

func SEQtoUMID(s uint64) umid.UMID

func SetAnonymizer

func SetAnonymizer(n umid.UMID, s umid.UMID)

func UMIDToSEQ added in v0.4.0

func UMIDToSEQ(id umid.UMID) uint64

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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