Documentation
¶
Index ¶
Constants ¶
View Source
const ( ListTypeString = "collections.List[" 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 ¶
This section is empty.
Functions ¶
Types ¶
type EmptyInterface ¶
EmptyInterface any底层结构,参考reflect.Value的emptyInterface设计
type PointerMeta ¶
PointerMeta 元数据
func PointerOfValue ¶
func PointerOfValue(val reflect.Value) PointerMeta
PointerOfValue 传入任意变量类型的值,得出该值对应的类型 //go:linkname nanotime1 reflect.nanotime1
func Test ¶
func Test(val any) PointerMeta
type StringHeader ¶
StringHeader is the runtime representation of a string. It cannot be used safely or portably and its representation may change in a later release. Moreover, the Data field is not sufficient to guarantee the data it references will not be garbage collected, so programs must keep a separate, correctly typed pointer to the underlying data.
In new code, use unsafe.String or unsafe.StringData instead.
type TypeMeta ¶
type TypeMeta struct {
//Name string // 字段名称
ReflectType reflect.Type // 字段类型
ReflectTypeString string // 类型
ReflectTypeBytes []byte // 类型
TypeIdentity string // 类型标识
Type FieldType // 集合类型
IsAddr bool // 原类型是否带指针
StructField []reflect.StructField // 结构体的字段
ExportedField []int // 结构体的字段,允许导出的字段索引
MapType reflect.Type // Dic的底层map类型
SliceType reflect.Type // ItemType转成切片类型
ZeroValue any // 零值时的值
ZeroReflectValue reflect.Value // 零值时的值
ZeroReflectValueElem reflect.Value // 零值时的值
Kind reflect.Kind // 类型
IsNumber bool // 是否为数字
IsEmum bool // 是否枚举
IsString bool // 是否为字符串
IsBool bool // 是否bool
IsTime bool // 是否time.Time
IsDateTime bool // 是否dateTime.DateTime
IsSliceOrArray bool // 是否切片或数组类型
IsStruct bool // 是否结构体
IsMap bool // 是否字典
HashCode uint32 // 每个类型的HashCode都是唯一的
Size uintptr // 内存占用大小
// contains filtered or unexported fields
}
TypeMeta 类型元数据
func (*TypeMeta) GetItemMeta ¶
Click to show internal directories.
Click to hide internal directories.