Documentation ¶
Index ¶
- type Money
- func (m Money) Abs() Money
- func (m Money) Add(value Money) Money
- func (m Money) Atan() Money
- func (m Money) BigFloat() *big.Float
- func (m Money) BigInt() *big.Int
- func (m Money) Ceil() Money
- func (m Money) Cmp(value Money) int
- func (m Money) Coefficient() *big.Int
- func (m Money) CoefficientInt64() int64
- func (m Money) Copy() Money
- func (m Money) Cos() Money
- func (m Money) Decimal128() primitive.Decimal128
- func (m Money) Div(value Money) Money
- func (m Money) DivRound(d2 Money, precision int32) Money
- func (m Money) Equal(value Money) bool
- func (m Money) Equals(d2 Money) bool
- func (m Money) ExpHullAbrham(overallPrecision uint32) (Money, error)
- func (m Money) ExpTaylor(precision int32) (Money, error)
- func (m Money) Exponent() int32
- 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) GetRawString() string
- func (m Money) GobEncode() ([]byte, error)
- func (m Money) GreaterThan(value Money) bool
- func (m Money) GreaterThanOrEqual(value Money) bool
- func (m Money) InexactFloat64() float64
- func (m Money) IntPart() int64
- func (m Money) IsInteger() bool
- func (m Money) IsNegative() bool
- func (m Money) IsPositive() bool
- func (m Money) IsZero() 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) MarshalBinary() (data []byte, err 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) Mod(value Money) Money
- func (m Money) Mul(value Money) Money
- func (m Money) Neg() Money
- func (m Money) NumDigits() int
- func (m Money) Pow(value Money) Money
- func (m Money) QuoRem(d2 Money, precision int32) (Money, Money)
- func (m Money) Rat() *big.Rat
- func (m Money) Round(num int32) Money
- func (m Money) RoundBank(num int32) Money
- func (m Money) RoundCash(num uint8) Money
- func (m Money) RoundCeil(num int32) Money
- func (m Money) RoundDown(num int32) Money
- func (m Money) RoundFloor(num int32) Money
- func (m Money) RoundUp(num int32) Money
- func (d *Money) Scan(value interface{}) error
- func (m Money) Shift(shift int32) Money
- func (m Money) Sign() int
- func (m Money) Sin() Money
- func (m Money) String() string
- func (m Money) StringFixed(places int32) string
- func (m Money) StringFixedBank(places int32) string
- func (m Money) StringFixedCash(interval uint8) string
- func (m Money) StringScaled(exp int32) string
- func (m Money) Sub(value Money) Money
- func (m Money) Tan() Money
- func (m Money) Truncate(precision int32) 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
- 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 struct {
// contains filtered or unexported fields
}
func NewMoneyFromDecimal ¶
func NewMoneyFromFloat ¶
func NewMoneyFromString ¶
func (Money) Coefficient ¶ added in v1.1.0
func (Money) CoefficientInt64 ¶ added in v1.1.0
func (Money) Decimal128 ¶ added in v1.1.3
func (m Money) Decimal128() primitive.Decimal128
func (Money) ExpHullAbrham ¶ added in v1.1.0
func (Money) FloorWithDecimal ¶
func (Money) FormatNumber ¶
func (Money) FormatNumberWithPrecision ¶
func (Money) FormatNumberWithoutDecimal ¶
func (Money) FormatString ¶
func (Money) GetRawString ¶ added in v1.1.7
func (Money) GreaterThan ¶
func (Money) GreaterThanOrEqual ¶
func (Money) InexactFloat64 ¶ added in v1.1.0
func (Money) IsNegative ¶ added in v1.1.0
func (Money) IsPositive ¶ added in v1.1.0
func (Money) LessThanOrEqual ¶
func (Money) MarshalBinary ¶ added in v1.1.0
func (Money) MarshalJSON ¶
func (Money) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for XML serialization.
func (Money) MarshalXML ¶
func (Money) RoundFloor ¶ added in v1.0.2
func (*Money) Scan ¶ added in v1.1.1
Scan implements the sql.Scanner interface for database deserialization.
func (Money) StringFixed ¶ added in v1.1.0
func (Money) StringFixedBank ¶ added in v1.1.0
func (Money) StringFixedCash ¶ added in v1.1.0
func (Money) StringScaled ¶ added in v1.1.0
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.