Documentation
¶
Index ¶
Constants ¶
View Source
const (
CurrencyKey = "currency"
)
Variables ¶
View Source
var CurrencyKeyFn = contract.PathKeyFn(CurrencyKey)
Functions ¶
func Idx ¶
func Idx(p ...string) []contract.IndexEntry
func IdxSrch ¶
func IdxSrch(p ...string) []contract.SearchIndexEntry
func Rules ¶
func Rules(p ...string) contractpkg.QueryParamRules
Types ¶
type Core ¶
type Core struct {
Currency *string `json:"currency" conform:"upper,trim" validate:"nnpt,nz,isocurrency"`
}
func ApplyCore ¶
func ApplyCore(c *Core, modifiers ...CoreOption) Core
func (*Core) GetCurrency ¶
func (*Core) SetCurrency ¶
type CoreOption ¶
type CoreOption = contracti.CoreOption[Core]
func WithCurrency ¶
func WithCurrency(x string) CoreOption
type Currency ¶
type Currency struct {
Meta `bson:",inline" validate:"recurse"`
Core `bson:",inline" validate:"recurse"`
}
Currency defines a three-letter ISO currency code.
type Meta ¶
type Meta struct{}
func ApplyMeta ¶
func ApplyMeta(m *Meta, modifiers ...MetaOption) Meta
type MetaOption ¶
type MetaOption = contract.MetaOption[Meta]
Click to show internal directories.
Click to hide internal directories.