Documentation ¶
Index ¶
- Constants
- Variables
- func BigInt2HexInt(value *big.Int) *common.HexInt
- func CalcPower(br icmodule.Rate, bonded, voted *big.Int) *big.Int
- func ContainsAll(flags, flag int) bool
- func ContainsAny(flags, flag int) bool
- func ICXToIScore(icx *big.Int) *big.Int
- func IScoreToICX(iScore *big.Int) *big.Int
- func IsNil(i interface{}) bool
- func MergeMaps(maps ...map[string]interface{}) map[string]interface{}
- func Min(value1, value2 int) int
- func MinBigInt(v0, v1 *big.Int) *big.Int
- func NewIconLogger(logger log.Logger) log.Logger
- func Pow10(n int) *big.Int
- func ToDecimal(x, y int) *big.Int
- func ToKey(o interface{}) string
- func ToLoop(icx int) *big.Int
- func ValidateCountryAlpha3(alpha3 string) error
- func ValidateEmail(email string, revision int) error
- func ValidateEndpoint(endpoint string) error
- func ValidateRange(oldValue *big.Int, newValue *big.Int, minPct int, maxPct int) error
- func ValidateURL(url string) error
Constants ¶
View Source
const ( SchemePattern = `(http:\/\/|https:\/\/)` HostNamePattern = `(localhost|(?:[\w\d](?:[\w\d-]{0,61}[\w\d])\.)+[\w\d][\w\d-]{0,61}[\w\d])` IPv4Pattern = `(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])` PortPattern = `(:[0-9]{1,5})?` PathPattern = `(\/\S*)?` EmailPattern = `[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*@` + HostNamePattern PortMax = 65536 EmailLocalMax = 64 EmailMax = 254 )
Variables ¶
View Source
var BigIntICX = big.NewInt(1_000_000_000_000_000_000)
Functions ¶
func CalcPower ¶ added in v1.4.0
CalcPower calculates the amount of power with bondRequirement, bonded and voted (= bonded + delegated)
func ContainsAll ¶ added in v1.4.0
func ContainsAny ¶ added in v1.4.0
func ValidateCountryAlpha3 ¶ added in v0.9.8
func ValidateEmail ¶
func ValidateEndpoint ¶
func ValidateRange ¶
func ValidateURL ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.