Documentation
¶
Index ¶
- func Test()
- type Money
- func (m Money) Abs() Money
- func (m Money) Add(value Money) Money
- func (m Money) Cmp(value Money) int
- func (m Money) Div(value Money) Money
- func (m Money) Equal(value Money) bool
- func (m Money) Float64() float64
- func (m Money) Floor() Money
- func (m Money) FloorWithDecimal(index int32) Money
- func (m Money) FormatNumber() string
- func (m Money) FormatNumberWithPrecision(precision int) string
- func (m Money) FormatNumberWithoutDecimal() string
- func (m Money) FormatString() string
- func (m Money) GreaterThan(value Money) bool
- func (m Money) GreaterThanOrEqual(value Money) bool
- func (m Money) LessThan(value Money) bool
- func (m Money) LessThanOrEqual(value Money) bool
- func (m Money) MarshalBSONValue() (bsontype.Type, []byte, error)
- func (m Money) MarshalJSON() ([]byte, error)
- func (m Money) MarshalText() (text []byte, err error)
- func (m Money) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (m Money) Mul(value Money) Money
- func (m Money) Neg() Money
- func (m Money) Round(num int32) Money
- func (m Money) Shift(shift int32) Money
- func (m Money) String() string
- func (m Money) Sub(value Money) Money
- func (m *Money) UnmarshalBSONValue(dataType bsontype.Type, data []byte) error
- func (m *Money) UnmarshalJSON(data []byte) error
- func (m *Money) UnmarshalText(text []byte) error
- func (m *Money) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
- func (m *Money) UnmarshalXMLAttr(attr xml.Attr) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Money ¶
type Money struct {
// contains filtered or unexported fields
}
func NewMoneyFromDecimal ¶
func NewMoneyFromFloat ¶
func NewMoneyFromString ¶
func (Money) FloorWithDecimal ¶
func (Money) FormatNumber ¶
func (Money) FormatNumberWithPrecision ¶
func (Money) FormatNumberWithoutDecimal ¶
func (Money) FormatString ¶
func (Money) GreaterThan ¶
func (Money) GreaterThanOrEqual ¶
func (Money) LessThanOrEqual ¶
func (Money) MarshalJSON ¶
func (Money) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for XML serialization.
func (Money) MarshalXML ¶
func (*Money) UnmarshalBSONValue ¶
func (*Money) UnmarshalJSON ¶
func (*Money) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for XML deserialization.
func (*Money) UnmarshalXML ¶
Click to show internal directories.
Click to hide internal directories.