utils

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Int64FromBytes

func Int64FromBytes(bz []byte) int64

Int64FromBytes converts some fixed length bytes back into a int64.

func Int64ToBytes

func Int64ToBytes(id int64) []byte

Int64ToBytes converts a int64 into fixed length bytes for use in store keys.

func IsValidUID

func IsValidUID(uid string) bool

IsValidUID validates if a uid is in correct format

func NewPubKeyMemory

func NewPubKeyMemory(bs []byte) []byte

func RemoveDuplicateStrs

func RemoveDuplicateStrs(strSlice []string) (list []string)

RemoveDuplicateStrs returns input array without duplicates

func RemoveStr

func RemoveStr(s []string, r string) []string

RemoveStr removes an item from string slice.

func StrBytes

func StrBytes(p string) []byte

StrBytes returns []byte form of its input string

func Uint64FromBytes

func Uint64FromBytes(bz []byte) uint64

Uint64FromBytes converts some fixed length bytes back into a uint64.

func Uint64ToBytes

func Uint64ToBytes(id uint64) []byte

Uint64ToBytes converts a uint64 into fixed length bytes for use in store keys.

Types

This section is empty.

Jump to

Keyboard shortcuts

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