bankgovua

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2017 License: Unlicense Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultApiAddr = "https://bank.gov.ua"

DefaultApiAddr holds default API address.

Variables

This section is empty.

Functions

This section is empty.

Types

type CurrencyRates

type CurrencyRates struct {
	// contains filtered or unexported fields
}

CurrencyRates implemets currency rates client for bank.gov.ua: https://bank.gov.ua/control/uk/publish/article?art_id=38441973

func NewCurrencyRates

func NewCurrencyRates() *CurrencyRates

NewCurrencyRates constructs new currency rates client for bank.gov.ua.

func NewCurrencyRatesWithAddr

func NewCurrencyRatesWithAddr(addr string) *CurrencyRates

NewCurrencyRatesWithAddr constructs new currency rates client for given addr (like proto://host:port, no path). Mostly for testing.

func (*CurrencyRates) Rate

func (r *CurrencyRates) Rate(from, to string, date time.Time) (float64, error)

Rate returns currency rate for given date. Only to=UAH is supported.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL