fc

package
v1.1.23 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare added in v1.1.14

func Compare(v1 interface{}, operation string, v2 interface{}) bool

func SCompare added in v1.1.14

func SCompare(v1 interface{}, operation string, v2 interface{}) (bool, error)

Types

type FCT

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

func Cal added in v1.1.14

func Cal(val ...interface{}) FCT

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

func New added in v1.1.14

func New(val interface{}) FCT

func SCal added in v1.1.14

func SCal(val ...interface{}) (FCT, error)

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

func SNew added in v1.1.14

func SNew(val interface{}) (FCT, error)

func (FCT) Ceil added in v1.1.19

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

func (FCT) Decimal added in v1.1.14

func (slf FCT) Decimal() decimal.Decimal

func (FCT) Float64

func (slf FCT) Float64() float64

func (FCT) Floor added in v1.1.14

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

func (FCT) Int added in v1.1.14

func (slf FCT) Int() int

func (FCT) Int64 added in v1.1.14

func (slf FCT) Int64() int64

func (FCT) MarshalJSON added in v1.1.16

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

MarshalJSON implements the json.Marshaler interface.

func (FCT) Pow added in v1.1.19

func (slf FCT) Pow(val interface{}) FCT

func (*FCT) PtrCeil added in v1.1.19

func (slf *FCT) PtrCeil(opt ...interface{}) *FCT

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

func (*FCT) PtrDecimal added in v1.1.16

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

func (*FCT) PtrFloat64 added in v1.1.16

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

func (*FCT) PtrFloor added in v1.1.16

func (slf *FCT) PtrFloor(opt ...interface{}) *FCT

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

func (*FCT) PtrInt added in v1.1.16

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

func (*FCT) PtrInt64 added in v1.1.16

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

func (*FCT) PtrRound added in v1.1.16

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

func (*FCT) PtrTruncate added in v1.1.23

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

func (FCT) Round added in v1.1.14

func (slf FCT) Round(places int) FCT

func (FCT) SPow added in v1.1.19

func (slf FCT) SPow(val interface{}) (FCT, error)

func (*FCT) Scan added in v1.1.16

func (slf *FCT) Scan(value interface{}) error

Scan implements the sql.Scanner interface for database deserialization.

func (*FCT) ToString added in v1.1.17

func (slf *FCT) ToString() string

func (FCT) Truncate added in v1.1.23

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

func (*FCT) UnmarshalJSON added in v1.1.16

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

UnmarshalJSON implements the json.Unmarshaler interface.

func (FCT) Value added in v1.1.16

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