Help us shape the future of Go! Take the 2026 Go Developer Survey

fixer

package module
v0.0.0-...-ac6b638 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2017 License: MIT Imports: 5 Imported by: 0

README

A Go API client for fixer.io. For usage see GoDoc. Works in App Engine and standard Go environments.

Documentation

Overview

Package fixer is a client for the Fixer.io API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(ctx context.Context, from Currency, to Currency, amt float64) (float64, error)

Types

type Currency

type Currency string
const (
	EUR Currency = "EUR"
	AUD Currency = "AUD"
	BGN Currency = "BGN"
	BRL Currency = "BRL"
	CAD Currency = "CAD"
	CHF Currency = "CHF"
	CNY Currency = "CNY"
	CZK Currency = "CZK"
	DKK Currency = "DKK"
	GBP Currency = "GBP"
	HKD Currency = "HKD"
	HRK Currency = "HRK"
	HUF Currency = "HUF"
	IDR Currency = "IDR"
	ILS Currency = "ILS"
	INR Currency = "INR"
	JPY Currency = "JPY"
	KRW Currency = "KRW"
	MXN Currency = "MXN"
	MYR Currency = "MYR"
	NOK Currency = "NOK"
	NZD Currency = "NZD"
	PHP Currency = "PHP"
	PLN Currency = "PLN"
	RON Currency = "RON"
	RUB Currency = "RUB"
	SEK Currency = "SEK"
	SGD Currency = "SGD"
	THB Currency = "THB"
	TRY Currency = "TRY"
	USD Currency = "USD"
	ZAR Currency = "ZAR"
)

func (Currency) String

func (c Currency) String() string

type Rate

type Rate struct {
	Currency Currency
	Rate     float64
}

type Rates

type Rates []Rate

func Get

func Get(ctx context.Context, base Currency) (Rates, error)

func Latest

func Latest(ctx context.Context) (Rates, error)

Jump to

Keyboard shortcuts

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