amount

package
v0.0.0-...-da19eeb Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Amount

type Amount struct {
	// contains filtered or unexported fields
}

func FromDecimalString

func FromDecimalString(value string) (Amount, error)

func FromString

func FromString(precision int, value string) (Amount, error)

func New

func New(precision int) Amount

func NewValue

func NewValue(precision int, value uint64) Amount

func (*Amount) Add

func (a *Amount) Add(x, y Amount)

func (*Amount) Float

func (a *Amount) Float() *big.Float

func (*Amount) Float64

func (a *Amount) Float64() float64

func (*Amount) Parse

func (a *Amount) Parse(value string) error

func (*Amount) Precision

func (a *Amount) Precision() int

func (*Amount) Scaled

func (a *Amount) Scaled(targetPrecision int) Amount

func (*Amount) String

func (a *Amount) String() string

func (*Amount) Uint64

func (a *Amount) Uint64() uint64

func (*Amount) Valid

func (a *Amount) Valid() bool

func (*Amount) Value

func (a *Amount) Value() *big.Int

Jump to

Keyboard shortcuts

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