Documentation ¶
Index ¶
- type Money
- func (m *Money) DecodeValue(v any) (err error)
- func (m Money) Float64() float64
- func (m Money) Int64() int64
- func (m Money) MarshalJSON() ([]byte, error)
- func (m *Money) Scan(value any) error
- func (m *Money) SetFromFloat64(v float64)
- func (m *Money) SetFromInt64(v int64)
- func (m Money) String() string
- func (m *Money) UnmarshalJSON(b []byte) error
- func (m *Money) UnmarshalYAML(unmarshal func(any) error) error
- func (m Money) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Money ¶
type Money int64
Money value type: first 9 numbers it's float part Example:
1_000000000 => 1 $ 0_010000000 => 0.01 $
func (*Money) DecodeValue ¶
DecodeValue implements the gocast.Decoder
func (Money) MarshalJSON ¶
MarshalJSON implements the json.Marshaler
func (*Money) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller
func (*Money) UnmarshalYAML ¶
Implements the Unmarshaler interface of the yaml pkg.
Click to show internal directories.
Click to hide internal directories.