Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateDeliveryTime ¶
CalculateDeliveryTime returns the time until an estimated future date
func ExchangeRateGraph ¶
ExchangeRateGraph prints an ASCII plot for the last 30 days of rates for a currency pair
func ValidCurrencyCode ¶
Check that a currency code is a recognised ISO 4217 value and well formatted
Types ¶
type ExchangeRateRecord ¶
type ExchangeRateRecord struct { Rate float64 `json:"rate,omitempty"` Source string `json:"source,omitempty"` Target string `json:"target,omitempty"` Time string `json:"time,omitempty"` }
ExchangeRateRecord is the recorded exchange rate at a point in time
type RateHistory ¶
type RateHistory struct {
Entries []ExchangeRateRecord
}
RateHistory is a collection of rate records for a currency pair
func (*RateHistory) Rates ¶
func (r *RateHistory) Rates() []float64
Rates returns all the number values for rate from a collection of entries
Click to show internal directories.
Click to hide internal directories.