Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Empty = errors.New("Cache empty, ensure you've successfully called Populate at least once.")
Functions ¶
This section is empty.
Types ¶
type ExchangeRates ¶
type ExchangeRates struct { Base string Timestamp time.Time // contains filtered or unexported fields }
func (*ExchangeRates) All ¶
func (r *ExchangeRates) All() (map[string]float64, error)
Get all the exchange rates
func (*ExchangeRates) Get ¶
func (r *ExchangeRates) Get(currency string) (float64, error)
Get the exchange rate for a currency
func (*ExchangeRates) Populate ¶
func (r *ExchangeRates) Populate() error
Populate the rates from Open Exchange Rates
Click to show internal directories.
Click to hide internal directories.