utils

package
v0.0.0-...-6e12e82 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Int32FromBytes

func Int32FromBytes(bz []byte) int32

Int32FromBytes converts some fixed length bytes back into a int32.

func Int32ToBytes

func Int32ToBytes(id int32) []byte

Int32ToBytes converts a int32 into fixed length bytes for use in store keys.

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 PopStrAtIndex

func PopStrAtIndex(s []string, i uint32) ([]string, string)

PopStrAtIndex pops an string item from string slice by index.

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