exchangerate: Index | Files

package exchangerate

import ""


Package Files

rate.go rate_helper.go

func Query Uses

func Query(apiKey, from string, amount float32, to []string) map[string]string

Query exchange rates for multiple currencies

type RateHelper Uses

type RateHelper struct {
    APIKey       string
    Amount       float32
    FromCurrency string
    ToCurrency   []string
    Result       map[string]string
    // contains filtered or unexported fields

RateHelper struct definition

func NewRateHelper Uses

func NewRateHelper() *RateHelper

NewRateHelper creates and return a new rate helper struct

func (*RateHelper) Query Uses

func (helper *RateHelper) Query()

Query function, queries different exchange rates and return the results

func (*RateHelper) SaveResult Uses

func (helper *RateHelper) SaveResult(key, value string)

SaveResult saves rate into internal map

Package exchangerate imports 6 packages (graph). Updated 2019-04-25. Refresh now. Tools for package owners.