Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func RegisterGeneratedResolver ¶
func RegisterGeneratedResolver()
RegisterGeneratedResolver registers generated resolver.
Types ¶
type Amount ¶
type Amount struct { // Currency in which the price is presented CurrencyCode Code `json:"currency_code" swaggen:"required,type=string,format=currency"` // Float value of price Value float64 `json:"value" swaggen:"required"` }
Currency amount.
func (Amount) IsNegative ¶
type Code ¶
swaggen: type=string swaggen: format=currency
func MustNewCode ¶
func (*Code) FromString ¶
FromString sets the Code from its string representation.
func (Code) MarshalJSON ¶
func (Code) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface and serializes Code to its string representation. NOTE: zero currency code marshals as "XXX", need fix this?
func (*Code) UnmarshalJSON ¶
func (*Code) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface and parses Code from its string representation.
Click to show internal directories.
Click to hide internal directories.