currency

package
v0.65.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package currency is used internally to generate Go currency structures from a data source.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCodes

func GenerateCodes() error

GenerateCodes is a special tool function used to convert the source XML data into an array of currency definitions.

Types

type CurrencyDef

type CurrencyDef struct {
	Name    string `xml:"CcyNm"`      // name of the currency
	Country string `xml:"CtryNm"`     // name of the country it belongs to
	Code    string `xml:"Ccy"`        // three-letter currency code
	Num     string `xml:"CcyNbr"`     // three-digit currency code
	Units   string `xml:"CcyMnrUnts"` // how many cents are used for the currency
}

CurrencyDef ...

type CurrencyDoc

type CurrencyDoc struct {
	XMLName xml.Name       `xml:"ISO_4217"`
	Table   *CurrencyTable `xml:"CcyTbl"`
}

CurrencyDoc is a currency document

type CurrencyTable

type CurrencyTable struct {
	Rows []*CurrencyDef `xml:"CcyNtry"`
}

CurrencyTable ...

Jump to

Keyboard shortcuts

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