fc

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare

func Compare(v1 any, operation string, v2 any) bool

func SCompare

func SCompare(v1 any, operation string, v2 any) (bool, error)

Types

type FCT

type FCT struct {
	V1 string
	V2 string
	// contains filtered or unexported fields
}

func Cal

func Cal(val ...any) FCT

supported operator: +, -, *, /, %

func New

func New(val any) FCT

func SCal

func SCal(val ...any) (FCT, error)

supported operator: +, -, *, /, %

func SNew

func SNew(val any) (FCT, error)

func (FCT) Ceil

func (slf FCT) Ceil(places ...int) FCT

func (FCT) Decimal

func (slf FCT) Decimal() decimal.Decimal

func (FCT) Float64

func (slf FCT) Float64() float64

func (FCT) Floor

func (slf FCT) Floor(places ...int) FCT

func (*FCT) GetDefault

func (slf *FCT) GetDefault(val any) FCT

func (FCT) Int

func (slf FCT) Int() int

func (FCT) Int64

func (slf FCT) Int64() int64

func (FCT) MarshalJSON

func (slf FCT) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (FCT) Pow

func (slf FCT) Pow(val any) FCT

func (*FCT) PtrCeil

func (slf *FCT) PtrCeil(opt ...any) *FCT

Places parameter using int/int32/int64 type. DefaultValue using fc.FCT type.

func (*FCT) PtrDecimal

func (slf *FCT) PtrDecimal() *decimal.Decimal

func (*FCT) PtrFloat64

func (slf *FCT) PtrFloat64(defaultValue ...float64) *float64

func (*FCT) PtrFloor

func (slf *FCT) PtrFloor(opt ...any) *FCT

Places parameter using int/int32/int64 type. DefaultValue using fc.FCT type.

func (*FCT) PtrInt

func (slf *FCT) PtrInt(defaultValue ...int) *int

func (*FCT) PtrInt64

func (slf *FCT) PtrInt64(defaultValue ...int64) *int64

func (*FCT) PtrRound

func (slf *FCT) PtrRound(places int, defaultValue ...any) *FCT

func (*FCT) PtrTruncate

func (slf *FCT) PtrTruncate(places ...int) *FCT

func (FCT) Round

func (slf FCT) Round(places int) FCT

func (FCT) SPow

func (slf FCT) SPow(val any) (FCT, error)

func (*FCT) Scan

func (slf *FCT) Scan(value any) error

Scan implements the sql.Scanner interface for database deserialization.

func (FCT) String

func (slf FCT) String() string

func (*FCT) ToString

func (slf *FCT) ToString() string

func (*FCT) ToStringF1

func (slf *FCT) ToStringF1() string

func (*FCT) ToStringF2

func (slf *FCT) ToStringF2() string

func (*FCT) ToStringSlim

func (slf *FCT) ToStringSlim() string

func (FCT) Truncate

func (slf FCT) Truncate(places ...int) FCT

func (*FCT) UnmarshalJSON

func (slf *FCT) UnmarshalJSON(decimalBytes []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (FCT) Value

func (slf FCT) Value() (driver.Value, error)

Value implements the driver.Valuer interface for database serialization.

Jump to

Keyboard shortcuts

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