Documentation ¶
Index ¶
- func NewIntFromString(number string) (i *big.Int, err error)
- func NewIntFromUint64(number uint64) (i *big.Int)
- func RequireIntFromString(number string) *big.Int
- type BigInt
- func (b *BigInt) Cmp(i *BigInt) int
- func (b *BigInt) LargerOrEqualToZero() bool
- func (b *BigInt) LargerThanZero() bool
- func (b BigInt) MarshalJSON() ([]byte, error)
- func (b *BigInt) Set(i *big.Int) *BigInt
- func (b BigInt) String() string
- func (b *BigInt) UnmarshalJSON(text []byte) error
- func (b *BigInt) Validate(formats strfmt.Registry) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewIntFromString ¶
NewIntFromString returns a new math/big.Int from a string representation
func NewIntFromUint64 ¶
NewIntFromUint64 returns a new big.Int from a uint64 representation
func RequireIntFromString ¶
RequireIntFromString returns a new big.Int from a string representation or panics if NewBigIntFromString would have returned an error.
Types ¶
type BigInt ¶
BigInt is an alias for math/big.Int, for use with Swagger generated code. Even though it has some corresponding methods, convert it as soon as possible into big.Int.
func (*BigInt) LargerOrEqualToZero ¶
LargerOrEqualToZero checks that the number is >=0
func (*BigInt) LargerThanZero ¶
LargerThanZero returns true if it is >0
func (BigInt) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (*BigInt) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
Click to show internal directories.
Click to hide internal directories.