Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Freedom ¶
type Freedom struct {
// contains filtered or unexported fields
}
func NewFreedom ¶
func NewFreedom(addr string, httpClient HTTPClient) *Freedom
NewFreedom creates a new Freedom driver.
func (*Freedom) FetchRates ¶
FetchRates fetches cash exchange rates for supported currencies.
type HTTPClient ¶
HTTPClient is an interface that defines the methods that an HTTP client must implement.
type Halyk ¶
type Halyk struct {
// contains filtered or unexported fields
}
func NewHalyk ¶
func NewHalyk(addr string, httpClient HTTPClient) *Halyk
func (*Halyk) FetchRates ¶
FetchRates returns latest (index 0) private persons rates for supported currencies.
type Home ¶
type Home struct {
// contains filtered or unexported fields
}
func NewHome ¶
func NewHome(addr string, httpClient HTTPClient) *Home
NewHome creates driver for home.kz.
func (*Home) FetchRates ¶
type Kaspi ¶
type Kaspi struct {
// contains filtered or unexported fields
}
func NewKaspi ¶
func NewKaspi(addr string, httpClient HTTPClient) *Kaspi
NewKaspi creates a new Kaspi driver. Default addr is "https://guide.kaspi.kz/client/api/v2/intgr/currency/rate/aggregate". Seems that addr works only from KZ location.
func (*Kaspi) FetchRates ¶
FetchRates fetches exchange rates from the Kaspi API.
type KaspiResponse ¶
type NBRK ¶
type NBRK struct {
// contains filtered or unexported fields
}
func NewNBRK ¶
func NewNBRK(addr string, client HTTPClient) *NBRK
NewNBRK creates a new NBRK driver. default address is "https://nationalbank.kz/rss/rates_all.xml" but you can pass your own address.
func (*NBRK) FetchRates ¶
FetchRates fetches exchange rates from the NBRK API.
type RBK ¶
type RBK struct {
// contains filtered or unexported fields
}
func (*RBK) FetchRates ¶
FetchRates returns latest online rates for supported currencies.