util

package
v1.5.11 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2021 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CHAINID int64
View Source
var IteratorLimit int

Functions

func BytesToUint64

func BytesToUint64(v []byte) (uint64, error)

func CallBack

func CallBack(err error)

func CheckBigInt

func CheckBigInt(num string) (types.Coin, error)

func CheckBool

func CheckBool(async string) (bool, error)

func CheckFabric

func CheckFabric(isFabric string) (bool, error)

func CheckInt64

func CheckInt64(num string) (int64, error)

func CheckJsonArgs

func CheckJsonArgs(str string, param interface{}) (bool, error)

func CheckRequiredFlag

func CheckRequiredFlag(cmd *cobra.Command, names ...string)

func CheckStringLength

func CheckStringLength(min, max int, str string) error

func CheckUint64

func CheckUint64(num string) (uint64, error)

func Discovery

func Discovery(f func(err error)) string

func ParsePubKey

func ParsePubKey(pub string) (crypto.PubKey, error)

func SetEnvToViper

func SetEnvToViper(vp *viper.Viper, key string) []string

func SetLimit

func SetLimit(limit int)

func Setup

func Setup(id int64)

func SetupRegisterCenter

func SetupRegisterCenter(f func(err error, lg log.Logger))

func TrapSignal

func TrapSignal(cleanupFunc func())

TrapSignal traps SIGINT and SIGTERM and terminates the server correctly.

func TxHash

func TxHash(b []byte) []byte

func Uint64ToBytes

func Uint64ToBytes(u uint64) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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