xtypes

package
v0.1.36 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: Apache-2.0 Imports: 10 Imported by: 24

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Deprecated: As of Go v0.2.0, this function simply calls [xreflect.GetBool].
	GetBool = xreflect.GetBool
	// Deprecated: As of Go v0.2.0, this function simply calls [xreflect.GetString].
	GetString = xreflect.GetString
	// Deprecated: As of Go v0.2.0, this function simply calls [xreflect.GetInt].
	GetInt = xreflect.GetInt
	// Deprecated: As of Go v0.2.0, this function simply calls [xreflect.GetInt64].
	GetInt64 = xreflect.GetInt64
	// Deprecated: As of Go v0.2.0, this function simply calls [xreflect.GetUint64].
	GetUint64 = xreflect.GetUint64
	// Deprecated: As of Go v0.2.0, this function simply calls [xreflect.GetFloat64].
	GetFloat64 = xreflect.GetFloat64
)
View Source
var AvgDecimal = decimal.Avg
View Source
var DecimalZero = decimal.Zero
View Source
var MaxDecimal = decimal.Max
View Source
var MinDecimal = decimal.Min
View Source
var NewDecimal = decimal.New
View Source
var NewDecimalFromBigInt = decimal.NewFromBigInt
View Source
var NewDecimalFromFloat = decimal.NewFromFloat
View Source
var NewDecimalFromFloat32 = decimal.NewFromFloat32
View Source
var NewDecimalFromFloatWithExponent = decimal.NewFromFloatWithExponent
View Source
var NewDecimalFromInt = decimal.NewFromInt
View Source
var NewDecimalFromInt32 = decimal.NewFromInt32
View Source
var NewDecimalFromString = decimal.NewFromString
View Source
var SumDecimal = decimal.Sum

Functions

This section is empty.

Types

type Decimal added in v0.1.15

type Decimal = decimal.Decimal

type NullDecimal added in v0.1.20

type NullDecimal = decimal.NullDecimal

type SMap

type SMap map[string]string

func (SMap) Del

func (m SMap) Del(key string)

func (SMap) Get

func (m SMap) Get(name string) string

func (SMap) GetWithDefault

func (m SMap) GetWithDefault(name string, def string) string

func (SMap) Keys

func (m SMap) Keys() []string

func (*SMap) MapScan added in v0.1.28

func (m *SMap) MapScan(obj interface{}) error

func (SMap) MarshalBinary

func (m SMap) MarshalBinary() (data []byte, err error)

func (SMap) Read

func (m SMap) Read(p []byte) (n int, err error)

func (SMap) Scan deprecated

func (m SMap) Scan(obj interface{}) error

Deprecated: As of Go v0.2.0, this function simply calls [ScanTo].

func (SMap) ScanTo added in v0.1.35

func (m SMap) ScanTo(obj interface{}) error

func (SMap) Set

func (m SMap) Set(key, val string)

func (SMap) Translate

func (m SMap) Translate(tpl string) string

func (SMap) Value added in v0.1.34

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

Value String

func (SMap) Values

func (m SMap) Values() map[string]string

type XMap

type XMap map[string]interface{}

func (XMap) Get

func (m XMap) Get(name string) (interface{}, bool)

Get 获取指定元素的值

func (XMap) GetBool

func (m XMap) GetBool(name string) bool

Get 获取指定元素的Bool值

func (XMap) GetFloat64 added in v0.1.2

func (m XMap) GetFloat64(key string) (float64, error)

func (XMap) GetInt added in v0.1.2

func (m XMap) GetInt(key string) (int, error)

func (XMap) GetInt64 added in v0.1.2

func (m XMap) GetInt64(key string) (int64, error)

func (XMap) GetString

func (m XMap) GetString(name string) string

Get 获取指定元素的值

func (XMap) IsEmpty

func (m XMap) IsEmpty() bool

func (XMap) Keys

func (m XMap) Keys() []string

Keys 从对象中获取数据值,如果不是字符串则返回空

func (XMap) Len

func (m XMap) Len() int

func (*XMap) MapScan added in v0.1.28

func (m *XMap) MapScan(obj interface{}) error

func (XMap) MarshalBinary

func (m XMap) MarshalBinary() (data []byte, err error)

func (XMap) Merge

func (m XMap) Merge(r XMap)

Merge 合并

func (XMap) SMap

func (m XMap) SMap() SMap

func (XMap) Scan

func (m XMap) Scan(obj interface{}) error

Scan 以json 标签进行序列化 Deprecated: As of Go v0.2.0, this function simply calls [ScanTo].

func (XMap) ScanTo added in v0.1.35

func (m XMap) ScanTo(obj interface{}) error

func (XMap) Translate

func (m XMap) Translate(tpl string) string

func (XMap) Value added in v0.1.34

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

Value String

type XMaps

type XMaps []XMap

func (*XMaps) Append

func (ms *XMaps) Append(i ...XMap) XMaps

func (XMaps) Get

func (ms XMaps) Get(idx int) XMap

func (XMaps) IsEmpty

func (ms XMaps) IsEmpty() bool

func (XMaps) Len

func (ms XMaps) Len() int

func (*XMaps) MapScan added in v0.1.28

func (m *XMaps) MapScan(obj interface{}) error

func (XMaps) MarshalBinary added in v0.1.34

func (m XMaps) MarshalBinary() (data []byte, err error)

func (XMaps) Scan deprecated added in v0.1.19

func (ms XMaps) Scan(obj interface{}) error

Deprecated: As of Go v0.2.0, this function simply calls [ScanTo].

func (XMaps) ScanTo added in v0.1.35

func (ms XMaps) ScanTo(obj interface{}) error

func (XMaps) Value added in v0.1.34

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

Value String

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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