types

package
v0.17.3 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2025 License: MIT Imports: 3 Imported by: 10

Documentation

Index

Constants

View Source
const (
	ListTypeString              = "collections.List["
	ListAnyTypeString           = "collections.ListAny"
	DictionaryTypeString        = "collections.Dictionary["
	PageListTypeString          = "collections.PageList["
	CollectionsTypeString       = "github.com/farseer-go/collections"
	CollectionsPrefixTypeString = "collections."
	DatetimeString              = "dateTime.DateTime"
	TimeString                  = "time.Time"
	DecimalString               = "decimal.Decimal"
	DomainSetString             = "data.DomainSet["
	TableSetString              = "data.TableSet["
	IndexSetString              = "elasticSearch.IndexSet["
)

Variables

View Source
var Cache = make(map[string][]int)

string key=自定义标识 value int=field or method对应的索引

Functions

func DictionaryAddMap added in v0.13.0

func DictionaryAddMap(lstValue reflect.Value, item any)

DictionaryAddMap 动态添加元素

func DictionaryNew added in v0.13.0

func DictionaryNew(lstType reflect.Type) reflect.Value

DictionaryNew 动态创建一个新的Dictionary

func ExecuteMapperInit added in v0.15.0

func ExecuteMapperInit(targetVal reflect.Value)

ExecuteMapperInit 在集合中获取数据

func GetAddMethod added in v0.13.0

func GetAddMethod(lstValue reflect.Value) reflect.Value

GetAddMethod 获取动态添加元素的Method

func GetDictionaryMapType added in v0.13.0

func GetDictionaryMapType(lstType reflect.Type) reflect.Type

GetDictionaryMapType 获取Dictionary的原始数组类型

func GetDictionaryToMap added in v0.13.0

func GetDictionaryToMap(lstValue reflect.Value) reflect.Value

GetDictionaryToMap 获取Dictionary的map元素

func GetInParam

func GetInParam(methodType reflect.Type) []reflect.Type

GetInParam 获取方法的入参

func GetListItemArrayType added in v0.9.0

func GetListItemArrayType(lstType reflect.Type) reflect.Type

GetListItemArrayType 获取List的原始数组类型

func GetListItemType added in v0.9.0

func GetListItemType(lstType reflect.Type) reflect.Type

GetListItemType 获取List的元素Type

func GetListToArray added in v0.13.0

func GetListToArray(lstValue reflect.Value) []any

GetListToArray 在集合中获取数据

func GetListToArrayValue added in v0.13.0

func GetListToArrayValue(lstValue reflect.Value) reflect.Value

GetListToArrayValue 在集合中获取数据

func GetOutParam

func GetOutParam(methodType reflect.Type) []reflect.Type

GetOutParam 获取方法的出参

func GetPageList added in v0.10.0

func GetPageList(pageList any) (any, int64)

GetPageList 获取collections.PageList的元素

func GetRealType

func GetRealType(val reflect.Value) reflect.Type

GetRealType 获取真实类型

func GetRealType2 added in v0.3.0

func GetRealType2(val reflect.Type) reflect.Type

func IsCollections

func IsCollections(ty reflect.Type) bool

IsCollections 是否为集合

func IsDataDomainSet added in v0.8.0

func IsDataDomainSet(val reflect.Value) (reflect.Type, bool)

IsDataDomainSet 判断类型是否为Data的DomainSet类型

func IsDataTableSet

func IsDataTableSet(val reflect.Value) (reflect.Type, bool)

IsDataTableSet 判断类型是否为Data的TableSet类型

func IsDictionary

func IsDictionary(val reflect.Value) (reflect.Type, bool)

IsDictionary 判断类型是否为Dictionary

func IsDictionaryByType added in v0.13.0

func IsDictionaryByType(realType reflect.Type) bool

IsDictionaryByType 判断类型是否为Dictionary

func IsDtoModel

func IsDtoModel(lst []reflect.Type) bool

IsDtoModel 当只有一个参数,且非集合类型,又是结构类型时,判断为DTO

func IsDtoModelIgnoreInterface added in v0.7.0

func IsDtoModelIgnoreInterface(lst []reflect.Type) bool

IsDtoModelIgnoreInterface 当第一个模型为struct,其它类型为interface时,判断为DTO

func IsEsIndexSet

func IsEsIndexSet(val reflect.Value) (reflect.Type, bool)

IsEsIndexSet 判断类型是否为ES的IndexSet类型

func IsGoBasicType added in v0.3.0

func IsGoBasicType(ty reflect.Type) bool

IsGoBasicType 是否为Go内置基础类型

func IsList

func IsList(val reflect.Value) (reflect.Type, bool)

IsList 判断类型是否为List

func IsListByType added in v0.9.0

func IsListByType(realType reflect.Type) (reflect.Type, bool)

IsListByType 判断类型是否为List

func IsMap

func IsMap(val reflect.Value) (reflect.Type, bool)

IsMap 是否为Map类型

func IsNil added in v0.12.0

func IsNil(val reflect.Value) bool

IsNil 判断值是否为nil

func IsPageList

func IsPageList(val reflect.Value) (reflect.Type, bool)

IsPageList 判断类型是否为PageList

func IsPageListByType added in v0.13.0

func IsPageListByType(realType reflect.Type) bool

IsPageListByType 判断类型是否为PageList

func IsSlice

func IsSlice(val reflect.Value) (reflect.Type, bool)

IsSlice 是否为切片类型

func IsStruct

func IsStruct(ty reflect.Type) bool

IsStruct 是否为Struct

func ListAdd added in v0.9.0

func ListAdd(lstValue reflect.Value, item any)

ListAdd 动态添加元素

func ListAddValue added in v0.13.0

func ListAddValue(lstValue reflect.Value, itemValue reflect.Value)

ListAddValue 动态添加元素

func ListNew added in v0.9.0

func ListNew(lstType reflect.Type, cap int) reflect.Value

ListNew 动态创建一个新的List

Types

This section is empty.

Jump to

Keyboard shortcuts

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