Documentation
¶
Index ¶
- Variables
- type Amount
- type Entry
- type Tree
- func (parent *Tree) AddChild(child *Tree)
- func (child *Tree) AddParent(parent *Tree) error
- func (t *Tree) Delete()
- func (t *Tree) FindHeightestChild(path *Tree, prevDeep, deepest int) (deep int, deepPath *Tree)
- func (t *Tree) GetKey() interface{}
- func (t *Tree) GetParentTreesRange(head *Tree) []*Tree
- func (t *Tree) GetValue() interface{}
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrAmountUnderflow indicates the value is negative, which is not allowed. ErrAmountUnderflow = errors.New("amount: underflow (value is negative)") // ErrAmountInvalidString indicates the string is not valid when converted to amount. ErrAmountInvalidString = errors.New("amount: invalid string to amount") )
Functions ¶
This section is empty.
Types ¶
type Amount ¶
Amount implements an unsigned integer type with arbitrary/no upper bound. It is based on big.Int.
func NewAmountFromBigInt ¶
NewAmountFromBigInt returns a new Amount struct with given big.Int representation.
func NewAmountFromBytes ¶
func NewAmountFromString ¶
NewAmountFromString returns a new Amount struct given string representation of an integer in base 10.
func (*Amount) Sub ¶
Sub returns difference of a - b. Returns nil with ErrAmountUnderflow if the result is negative (a < b)
type Tree ¶
entries include the node's entry itself as the first entry and its childrens' entry following
func (*Tree) FindHeightestChild ¶ added in v0.1.2
func (*Tree) GetParentTreesRange ¶ added in v0.1.2
Click to show internal directories.
Click to hide internal directories.