input

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: GPL-3.0 Imports: 12 Imported by: 51

Documentation

Index

Constants

View Source
const (
	MinPasswordLength int = 12
)

Config

Variables

This section is empty.

Functions

func ValidateAddress

func ValidateAddress(name, value string) (common.Address, error)

Validate an address

func ValidateBatch

func ValidateBatch[ReturnType any](name string, value string, validate func(string, string) (ReturnType, error)) ([]ReturnType, error)

Validate a comma-delimited batch of inputs

func ValidateBigInt

func ValidateBigInt(name, value string) (*big.Int, error)

Validate a big int

func ValidateBool

func ValidateBool(name, value string) (bool, error)

Validate a boolean value

func ValidateByteArray

func ValidateByteArray(name, value string) ([]byte, error)

Validate a hex-encoded byte array

func ValidateDuration

func ValidateDuration(name, value string) (time.Duration, error)

Validate a duration

func ValidateEthAmount

func ValidateEthAmount(name, value string) (float64, error)

Validate an ether amount

func ValidateFraction

func ValidateFraction(name, value string) (float64, error)

Validate a fraction

func ValidateHash

func ValidateHash(name, value string) (common.Hash, error)

Validate a hash

func ValidateNodePassword

func ValidateNodePassword(name string, value string) (string, error)

Validate a node password

func ValidatePercentage

func ValidatePercentage(name, value string) (float64, error)

Validate a percentage

func ValidatePositiveEthAmount

func ValidatePositiveEthAmount(name, value string) (float64, error)

Validate a positive ether amount

func ValidatePositiveOrZeroWeiAmount

func ValidatePositiveOrZeroWeiAmount(name, value string) (*big.Int, error)

Validate a positive or zero wei amount

func ValidatePositiveUint

func ValidatePositiveUint(name, value string) (uint64, error)

Validate a positive unsigned integer value

func ValidatePositiveUint32

func ValidatePositiveUint32(name, value string) (uint32, error)

Validate a positive 32-bit unsigned integer value

func ValidatePositiveWeiAmount

func ValidatePositiveWeiAmount(name, value string) (*big.Int, error)

Validate a positive wei amount

func ValidatePubkey

func ValidatePubkey(name, value string) (beacon.ValidatorPubkey, error)

Validate a validator pubkey

func ValidateTime

func ValidateTime(name, value string) (time.Time, error)

Validate a timestamp using RFC3339

func ValidateTimezoneLocation

func ValidateTimezoneLocation(name, value string) (string, error)

Validate a timezone location

func ValidateTxInfo

func ValidateTxInfo(name string, value string) (*eth.TransactionInfo, error)

Validate TX info

func ValidateUint

func ValidateUint(name, value string) (uint64, error)

Validate an unsigned integer value

func ValidateUint32

func ValidateUint32(name, value string) (uint32, error)

Validate an unsigned integer value

func ValidateWalletMnemonic

func ValidateWalletMnemonic(name, value string) (string, error)

Validate a wallet mnemonic phrase

func ValidateWeiAmount

func ValidateWeiAmount(name, value string) (*big.Int, error)

Validate a wei amount

Types

This section is empty.

Jump to

Keyboard shortcuts

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