Documentation ¶
Index ¶
- func SetGlobalCCM(ccm *CurrencyConverterModule)
- type CurrencyConverterModule
- func (s *CurrencyConverterModule) AddAndConvertFunds(mu1 *models.MonetaryUnit, mu2 models.MonetaryUnit) apierrors.ApiError
- func (s *CurrencyConverterModule) ConvertCurrency(mu models.MonetaryUnit, currency string) models.MonetaryUnit
- func (s *CurrencyConverterModule) SubtractAndConvertFunds(mu1 models.MonetaryUnit, mu2 models.MonetaryUnit) models.MonetaryUnit
- func (s *CurrencyConverterModule) SumAndConvertFunds(mu1 models.MonetaryUnit, mu2 models.MonetaryUnit) models.MonetaryUnit
- func (s *CurrencyConverterModule) SupportedCurrency(currency string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetGlobalCCM ¶
func SetGlobalCCM(ccm *CurrencyConverterModule)
Types ¶
type CurrencyConverterModule ¶
type CurrencyConverterModule struct { BaseCurrency string Rates map[string]map[string]currencyRate }
var CCM *CurrencyConverterModule
func NewCCM ¶
func NewCCM() *CurrencyConverterModule
func NewTestCCM ¶
func NewTestCCM() *CurrencyConverterModule
func (*CurrencyConverterModule) AddAndConvertFunds ¶
func (s *CurrencyConverterModule) AddAndConvertFunds(mu1 *models.MonetaryUnit, mu2 models.MonetaryUnit) apierrors.ApiError
func (*CurrencyConverterModule) ConvertCurrency ¶
func (s *CurrencyConverterModule) ConvertCurrency(mu models.MonetaryUnit, currency string) models.MonetaryUnit
func (*CurrencyConverterModule) SubtractAndConvertFunds ¶
func (s *CurrencyConverterModule) SubtractAndConvertFunds(mu1 models.MonetaryUnit, mu2 models.MonetaryUnit) models.MonetaryUnit
func (*CurrencyConverterModule) SumAndConvertFunds ¶
func (s *CurrencyConverterModule) SumAndConvertFunds(mu1 models.MonetaryUnit, mu2 models.MonetaryUnit) models.MonetaryUnit
func (*CurrencyConverterModule) SupportedCurrency ¶
func (s *CurrencyConverterModule) SupportedCurrency(currency string) bool
Click to show internal directories.
Click to hide internal directories.