Documentation ¶
Overview ¶
Package currencies provides a shared definition of currencies. This uses a global variable to hold the currencies.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectorFunc ¶
func CollectDefaults ¶
func CollectDefaults() CollectorFunc
func CollectJSON ¶
func CollectJSON(reader io.Reader) CollectorFunc
type Currency ¶
type Currency struct { Name string `json:"name"` Code string `json:"code"` Local string `json:"local"` Symbol string `json:"symbol"` }
func CollectionCurrencies ¶
func CollectionCurrencies(collectors ...CollectorFunc) ([]Currency, error)
type CurrencyRegistry ¶
type CurrencyRegistry struct {
// contains filtered or unexported fields
}
func NewCurrencyService ¶
func NewCurrencyService(currencies []Currency) *CurrencyRegistry
func (*CurrencyRegistry) IsSupported ¶
func (cs *CurrencyRegistry) IsSupported(code string) bool
func (*CurrencyRegistry) Slice ¶
func (cs *CurrencyRegistry) Slice() []Currency
Click to show internal directories.
Click to hide internal directories.