Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Currencies = map[string]string{
"EUR": "Euro",
"AUD": "Australian Dollar",
"BGN": "Bulgarian Lev",
"BRL": "Brazilian Real",
"CAD": "Canadian Dollar",
"CHF": "Swiss Franc",
"CNY": "Yuan Renminbi",
"CZK": "Czech Koruna",
"DKK": "Danish Krone",
"GBP": "Pound Sterling",
"HKD": "Hong Kong Dollar",
"HRK": "Croatian Kuna",
"HUF": "Forint",
"IDR": "Rupiah",
"IRL": "New Israeli Sheqel",
"INR": "Indian Rupee",
"JPY": "Yen",
"KRW": "Won",
"MXN": "Mexican Peso",
"MYR": "Malaysian Ringgit",
"NOK": "Norwegian Krone",
"NZD": "New Zealand Dollar",
"PHP": "Philippine Peso",
"PLN": "Zloty",
"RON": "New Romanian Leu",
"RUB": "Russian Ruble",
"SEK": "Swedish Krona",
"SGD": "Singapore Dollar",
"THB": "Baht",
"TRY": "Turkish Lira",
"USD": "US Dollar",
"ZAR": "Rand",
}
By lack of a public documentation, I got these out from a request to Fixer. Thse are all (I hope) the valid ISO codes of currencies Fixer supports.
Functions ¶
func GetIsoNames ¶
func GetIsoNames() string
Get's the names of ISO codes, and sorts them alphabetically
Types ¶
type Fixer ¶
type Fixer struct {
// Base is the currency base for calculations
Base string `json:"base"`
// Rates are the values, along with the ISO codes of each currency, and it's value, giving the base.
Rates map[string]float64 `json:"rates"`
}
The response of the Fixer API
func GetFixerData ¶
Returns an JSON object from the Fixer API.
Click to show internal directories.
Click to hide internal directories.