Documentation ¶
Overview ¶
Package currency provides lookups methods over ISO-4217 currencies.
Constants have been generated with code generation ./generator.
Author Mikalai Konan(mikalai.konan@icloud.com).
Index ¶
- func ByCode(code Code) (c currency, ok bool)
- func ByCodeErr(code Code) (c currency, err error)
- func ByCodeStr(code string) (c currency, ok bool)
- func ByCodeStrErr(code string) (c currency, err error)
- func ByCountry(country Country) (c currencies, ok bool)
- func ByCountryErr(country Country) (c currencies, err error)
- func ByCountryStr(country string) (c currencies, ok bool)
- func ByCountryStrErr(country string) (c currencies, err error)
- func ByCurrency(currency Currency) (c currency, ok bool)
- func ByCurrencyErr(currencyStr Currency) (c currency, err error)
- func ByCurrencyStr(currency string) (c currency, ok bool)
- func ByCurrencyStrErr(currencyStr string) (c currency, err error)
- func ByNumber(number Number) (c currency, ok bool)
- func ByNumberErr(number Number) (c currency, err error)
- func ByNumberStr(number string) (c currency, ok bool)
- func ByNumberStrErr(number string) (c currency, err error)
- type Code
- type Countries
- type Country
- type Currency
- type Number
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByCodeStrErr ¶
ByCodeStrErr lookup for currency type by code
func ByCountryErr ¶
ByCountryErr lookup for currencies type by country
func ByCountryStr ¶
ByCountryStr lookup for currencies type by country
func ByCountryStrErr ¶
ByCountryStrErr lookup for currencies type by country
func ByCurrency ¶
ByCurrency lookup for currency type by currency
func ByCurrencyErr ¶
ByCurrencyErr lookup for currencies type by code
func ByCurrencyStr ¶
ByCurrencyStr lookup for currency type by currency
func ByCurrencyStrErr ¶
ByCurrencyStrErr lookup for currency type by currency
func ByNumberErr ¶
ByNumberErr lookup for currencies type by number
func ByNumberStr ¶
ByNumberStr lookup for currency type by number
func ByNumberStrErr ¶
ByNumberStrErr lookup for currency type by number
Types ¶
type Code ¶
type Code string
Code represents a code type from ISO-4217
func (Code) Places ¶
Places returns number of digits after the dot. E.g. 2 for USD, 0 for currencies which do not support fractions
func (*Code) UnmarshalJSON ¶
UnmarshalJSON unmarshall implementation for Code
type Countries ¶
type Countries []Country
Countries is a Country slice type
func (Countries) IsCountryIn ¶
IsCountryIn Checks there is a country in Countries
type Country ¶
type Country string
Country represents a country type from ISO-4217
func (*Country) UnmarshalJSON ¶
UnmarshalJSON unmarshall implementation for Country
type Currency ¶
type Currency string
Currency represents a currency type from ISO-4217
func (*Currency) UnmarshalJSON ¶
UnmarshalJSON unmarshall implementation for Currency
type Number ¶
type Number string
Number represents a number type from ISO-4217
func (*Number) UnmarshalJSON ¶
UnmarshalJSON unmarshall implementation for Number