currencies

package
v0.0.0-...-6fd8457 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

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

type CollectorFunc func() ([]Currency, error)

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

Jump to

Keyboard shortcuts

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