billing

package
v0.0.0-...-7f3ae25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2026 License: Apache-2.0 Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Float

type Float interface {
	~float32 | ~float64
}

Float is a type constraint that matches any floating-point type.

type Integer

type Integer interface {
	Signed | Unsigned
}

Integer is a constraint that permits any integer type. If future releases of Go add new predeclared integer types, this constraint will be modified to include them.

type Money

type Money int64

Money value type: first 9 numbers it's float part Example:

1_000000000 => 1    $
0_010000000 => 0.01 $

func MoneyFloat

func MoneyFloat[T Float](amount T) Money

MoneyFloat object

func MoneyInt

func MoneyInt[T Integer](amount T) Money

MoneyInt object

func (*Money) DecodeValue

func (m *Money) DecodeValue(v any) (err error)

DecodeValue implements the gocast.Decoder

func (Money) F64

func (m Money) F64() float64

F64 value from money

func (Money) Float64

func (m Money) Float64() float64

Float64 value from money

func (Money) I64

func (m Money) I64() int64

I64 value from money

func (Money) Int64

func (m Money) Int64() int64

Int64 value from money

func (Money) MarshalJSON

func (m Money) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler

func (*Money) Scan

func (m *Money) Scan(value any) error

Scan implements the sql.Scanner interface

func (*Money) SetFromFloat64

func (m *Money) SetFromFloat64(v float64)

SetFromFloat64 value

func (*Money) SetFromInt64

func (m *Money) SetFromInt64(v int64)

SetFromInt64 value

func (Money) String

func (m Money) String() string

String implementation of Stringer interface

func (*Money) UnmarshalJSON

func (m *Money) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the json.Unmarshaller

func (*Money) UnmarshalYAML

func (m *Money) UnmarshalYAML(unmarshal func(any) error) error

Implements the Unmarshaler interface of the yaml pkg.

func (Money) Value

func (m Money) Value() (driver.Value, error)

Value implements the driver.Valuer interface

type Signed

type Signed interface {
	~int | ~int8 | ~int16 | ~int32 | ~int64
}

Signed is a constraint that permits any signed integer type. If future releases of Go add new predeclared signed integer types, this constraint will be modified to include them.

type Unsigned

type Unsigned interface {
	~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr
}

Unsigned is a constraint that permits any unsigned integer type. If future releases of Go add new predeclared unsigned integer types, this constraint will be modified to include them.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL