Documentation ¶
Overview ¶
Package currencypkg provides common currency related functionality for apps.
Index ¶
Constants ¶
View Source
const ( USD = "USD" EUR = "EUR" RMB = "RMB" )
Constants for all supported currencies.
Variables ¶
View Source
var SupportedCurrencies = []string{ USD, EUR, RMB, }
SupportedCurrencies holds all the supported currencies.
View Source
var ValidCurrency validator.Func = func(fl validator.FieldLevel) bool { if c, ok := fl.Field().Interface().(string); ok { return IsSupportedCurrency(c) } return false }
ValidCurrency validates whether the currency is supported.
Functions ¶
func IsSupportedCurrency ¶
IsSupportedCurrency returns true if the currncy is supported.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.