Documentation ¶
Overview ¶
types and functions for converting currencies to/from enumeration values
Index ¶
- Constants
- type Currency
- func (currency Currency) GetFee() (uint64, error)
- func (currency Currency) GoString() string
- func (currency Currency) Index() int
- func (currency Currency) IsValid() bool
- func (currency Currency) MarshalText() ([]byte, error)
- func (currency *Currency) Scan(state fmt.ScanState, verb rune) error
- func (currency Currency) String() string
- func (currency Currency) Uint64() uint64
- func (currency *Currency) UnmarshalText(s []byte) error
Constants ¶
View Source
const ( Nothing Currency = iota // this must be the first value Bitcoin Currency = iota Litecoin Currency = iota First Currency = Nothing + 1 Last Currency = maximumValue - 1 Count int = int(Last) // count of currencies )
possible currency values
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Currency ¶
type Currency uint64
currency enumeration
func (Currency) IsValid ¶ added in v0.5.0
valid currency if in range of First to Last None is not considered as valid
func (Currency) MarshalText ¶
convert a currency into JSON
func (*Currency) UnmarshalText ¶
convert currency string to a currency enumeration value from JSON
Click to show internal directories.
Click to hide internal directories.