util

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IDG_APPID    = "IDG_APPID"
	DefaultTCP   = "tcp://"
	DefaultHTTP  = "http://"
	DefaultHTTPS = "https://"
	DefaultWS    = "ws"
	DefaultWSS   = "wss"
)

/const CHIANID int64 = 999

Variables

View Source
var CHAINID int64
View Source
var IteratorLimit int

Functions

func AddDecimal added in v1.5.70

func AddDecimal(i *big.Int, d int, p int64)

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() (string, error)

func GetDomain added in v1.5.26

func GetDomain() (host string, err error)

func GetLocalAddress added in v1.5.25

func GetLocalAddress() string

func ParsePubKey

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

func SchemaPrefix added in v1.5.55

func SchemaPrefix() string

func SetEnvToViper

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

func SetLimit

func SetLimit(limit int)

func Setup

func Setup(id int64)

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

type DomainInfo added in v1.5.21

type DomainInfo struct {
	Host26657 string `json:"host_26657"`
	Host8546  string `json:"host_8546"`
}

Jump to

Keyboard shortcuts

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