mycurrencynet

package module
v0.0.0-...-704d2e0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: MIT Imports: 9 Imported by: 1

README

mycurrencynet

Get exchange rates from www.mycurrency.net

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fetch

func Fetch() (map[string]*Currency, error)

Types

type Currency

type Currency struct {
	Code      string
	Name      string
	Countries []string // TODO fill this
	Rate      float64
}

func (*Currency) To

func (c *Currency) To(t *Currency) float64

type MyCurrencyNet

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

func New

func New() *MyCurrencyNet

func (*MyCurrencyNet) Get

func (m *MyCurrencyNet) Get(codes ...string) ([]*Currency, error)

func (*MyCurrencyNet) Update

func (m *MyCurrencyNet) Update() error

func (*MyCurrencyNet) UpdateEvery

func (m *MyCurrencyNet) UpdateEvery(interval time.Duration, onErr func(error), onSuccess func())

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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