Documentation
¶
Index ¶
- type Decimal
- func Avg(first Decimal, rest ...Decimal) Decimal
- func Max(first Decimal, rest ...Decimal) Decimal
- func Min(first Decimal, rest ...Decimal) Decimal
- func New(intPart int64, decimalPart int32) Decimal
- func NewFromDecimal(d decimal.Decimal) Decimal
- func NewFromFloat(value float64) Decimal
- func NewFromFloat32(value float32) Decimal
- func NewFromString(value string) (Decimal, error)
- func RequireFromString(value string) Decimal
- func Sum(first Decimal, rest ...Decimal) (sum Decimal)
- func (d Decimal) Abs() Decimal
- func (d Decimal) Cmp(d2 Decimal) int
- func (d Decimal) Decimal() decimal.Decimal
- func (d Decimal) Div(d2 Decimal) Decimal
- func (d Decimal) DivRound(d2 Decimal, precision int8) Decimal
- func (d Decimal) Float64() (f float64, exact bool)
- func (d Decimal) Floor() Decimal
- func (d *Decimal) GobDecode(data []byte) (err error)
- func (d Decimal) GobEncode() ([]byte, error)
- func (d Decimal) IntPart() int64
- func (d Decimal) MarshalBinary() ([]byte, error)
- func (d Decimal) MarshalJSON() ([]byte, error)
- func (d Decimal) MarshalText() ([]byte, error)
- func (d Decimal) Mul(d2 Decimal) Decimal
- func (d Decimal) Round(places int8) Decimal
- func (d Decimal) RoundBank(places int8) Decimal
- func (d Decimal) RoundCash(interval uint8) Decimal
- func (d *Decimal) Scan(value interface{}) (err error)
- func (d Decimal) Shift(shift int8) Decimal
- func (d Decimal) Sign() int
- func (d Decimal) String() string
- func (d Decimal) StringFixed(places int8) string
- func (d Decimal) StringFixedBank(places int8) string
- func (d Decimal) StringFixedCash(interval uint8) string
- func (d Decimal) Truncate(precision int8) Decimal
- func (d *Decimal) UnmarshalBinary(data []byte) (err error)
- func (d *Decimal) UnmarshalJSON(decimalBytes []byte) (err error)
- func (d *Decimal) UnmarshalText(text []byte) (err error)
- func (d Decimal) Value() (driver.Value, error)
- type NullDecimal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decimal ¶
type Decimal int64
func NewFromDecimal ¶
func NewFromFloat ¶
func NewFromFloat32 ¶
func NewFromString ¶
func RequireFromString ¶
func (Decimal) MarshalBinary ¶
func (Decimal) MarshalJSON ¶
func (Decimal) MarshalText ¶
func (Decimal) StringFixed ¶
func (Decimal) StringFixedBank ¶
func (Decimal) StringFixedCash ¶
func (*Decimal) UnmarshalBinary ¶
func (*Decimal) UnmarshalJSON ¶
func (*Decimal) UnmarshalText ¶
type NullDecimal ¶
func NewFromNullDecimal ¶
func NewFromNullDecimal(d decimal.NullDecimal) NullDecimal
func (NullDecimal) MarshalJSON ¶
func (d NullDecimal) MarshalJSON() ([]byte, error)
func (NullDecimal) NullDecimal ¶
func (d NullDecimal) NullDecimal() decimal.NullDecimal
func (*NullDecimal) Scan ¶
func (d *NullDecimal) Scan(value interface{}) (err error)
func (*NullDecimal) UnmarshalJSON ¶
func (d *NullDecimal) UnmarshalJSON(decimalBytes []byte) (err error)
Click to show internal directories.
Click to hide internal directories.