exchangerate: github.com/TimothyYe/exchangerate Index | Files

package exchangerate

import "github.com/TimothyYe/exchangerate"

Index

Package Files

rate.go rate_helper.go

func Query Uses

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

Query exchange rates for multiple currencies

type RateHelper Uses

type RateHelper struct {
    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 2018-10-07. Refresh now. Tools for package owners.