Documentation
¶
Index ¶
- Constants
- func FieldGetBoolFunc(inst interface{}, field IField) (interface{}, error)
- func FieldGetBoolFuncV(instV reflect.Value, field IField) (interface{}, error)
- func FieldGetBoolFuncVT(instV reflect.Value, field IField) bool
- func FieldGetChanFunc(inst interface{}, field IField) (interface{}, error)
- func FieldGetChanFuncV(instV reflect.Value, field IField) (interface{}, error)
- func FieldGetComplex128Func(inst interface{}, field IField) (interface{}, error)
- func FieldGetComplex128FuncV(instV reflect.Value, field IField) (interface{}, error)
- func FieldGetComplex128FuncVT(instV reflect.Value, field IField) complex128
- func FieldGetComplex64Func(inst interface{}, field IField) (interface{}, error)
- func FieldGetComplex64FuncV(instV reflect.Value, field IField) (interface{}, error)
- func FieldGetComplex64FuncVT(instV reflect.Value, field IField) complex64
- func FieldGetFloat32Func(inst interface{}, field IField) (interface{}, error)
- func FieldGetFloat32FuncV(instV reflect.Value, field IField) (interface{}, error)
- func FieldGetFloat32FuncVT(instV reflect.Value, field IField) float32
- func FieldGetFloat64Func(inst interface{}, field IField) (interface{}, error)
- func FieldGetFloat64FuncV(instV reflect.Value, field IField) (interface{}, error)
- func FieldGetFloat64FuncVT(instV reflect.Value, field IField) float64
- func FieldGetInt16Func(inst interface{}, field IField) (interface{}, error)
- func FieldGetInt16FuncV(instV reflect.Value, field IField) (interface{}, error)
- func FieldGetInt16FuncVT(instV reflect.Value, field IField) int16
- func FieldGetInt32Func(inst interface{}, field IField) (interface{}, error)
- func FieldGetInt32FuncV(instV reflect.Value, field IField) (interface{}, error)
- func FieldGetInt32FuncVT(instV reflect.Value, field IField) int32
- func FieldGetInt64Func(inst interface{}, field IField) (interface{}, error)
- func FieldGetInt64FuncV(instV reflect.Value, field IField) (interface{}, error)
- func FieldGetInt64FuncVT(instV reflect.Value, field IField) int64
- func FieldGetInt8Func(inst interface{}, field IField) (interface{}, error)
- func FieldGetInt8FuncV(instV reflect.Value, field IField) (interface{}, error)
- func FieldGetIntFunc(inst interface{}, field IField) (interface{}, error)
- func FieldGetIntFuncV(instV reflect.Value, field IField) (interface{}, error)
- func FieldGetIntFuncVT(instV reflect.Value, field IField) int
- func FieldGetInterfaceFunc(inst interface{}, field IField) (interface{}, error)
- func FieldGetInterfaceFuncV(instV reflect.Value, field IField) (interface{}, error)
- func FieldGetMapFunc(inst interface{}, field IField) (interface{}, error)
- func FieldGetMapFuncV(instV reflect.Value, field IField) (interface{}, error)
- func FieldGetSliceFunc(inst interface{}, field IField) (interface{}, error)
- func FieldGetSliceFuncV(instV reflect.Value, field IField) (interface{}, error)
- func FieldGetStringFunc(inst interface{}, field IField) (interface{}, error)
- func FieldGetStringFuncV(instV reflect.Value, field IField) (interface{}, error)
- func FieldGetStringFuncVT(instV reflect.Value, field IField) string
- func FieldGetUint16Func(inst interface{}, field IField) (interface{}, error)
- func FieldGetUint16FuncV(instV reflect.Value, field IField) (interface{}, error)
- func FieldGetUint16FuncVT(instV reflect.Value, field IField) uint16
- func FieldGetUint32Func(inst interface{}, field IField) (interface{}, error)
- func FieldGetUint32FuncV(instV reflect.Value, field IField) (interface{}, error)
- func FieldGetUint32FuncVT(instV reflect.Value, field IField) uint32
- func FieldGetUint64Func(inst interface{}, field IField) (interface{}, error)
- func FieldGetUint64FuncV(instV reflect.Value, field IField) (interface{}, error)
- func FieldGetUint64FuncVT(instV reflect.Value, field IField) uint64
- func FieldGetUint8Func(inst interface{}, field IField) (interface{}, error)
- func FieldGetUint8FuncV(instV reflect.Value, field IField) (interface{}, error)
- func FieldGetUint8FuncVT(instV reflect.Value, field IField) uint8
- func FieldGetUintFunc(inst interface{}, field IField) (interface{}, error)
- func FieldGetUintFuncV(instV reflect.Value, field IField) (interface{}, error)
- func FieldSetBoolFunc(inst interface{}, field IField, value interface{}) error
- func FieldSetBoolFuncV(instV reflect.Value, field IField, value interface{}) error
- func FieldSetChanFunc(inst interface{}, field IField, value interface{}) error
- func FieldSetChanFuncV(instV reflect.Value, field IField, value interface{}) error
- func FieldSetComplex128Func(inst interface{}, field IField, value interface{}) error
- func FieldSetComplex128FuncV(instV reflect.Value, field IField, value interface{}) error
- func FieldSetComplex64Func(inst interface{}, field IField, value interface{}) error
- func FieldSetComplex64FuncV(instV reflect.Value, field IField, value interface{}) error
- func FieldSetFloat32Func(inst interface{}, field IField, value interface{}) error
- func FieldSetFloat32FuncV(instV reflect.Value, field IField, value interface{}) error
- func FieldSetFloat64Func(inst interface{}, field IField, value interface{}) error
- func FieldSetFloat64FuncV(instV reflect.Value, field IField, value interface{}) error
- func FieldSetInt16Func(inst interface{}, field IField, value interface{}) error
- func FieldSetInt16FuncV(instV reflect.Value, field IField, value interface{}) error
- func FieldSetInt32Func(inst interface{}, field IField, value interface{}) error
- func FieldSetInt32FuncV(instV reflect.Value, field IField, value interface{}) error
- func FieldSetInt64Func(inst interface{}, field IField, value interface{}) error
- func FieldSetInt64FuncV(instV reflect.Value, field IField, value interface{}) error
- func FieldSetInt8Func(inst interface{}, field IField, value interface{}) error
- func FieldSetInt8FuncV(instV reflect.Value, field IField, value interface{}) error
- func FieldSetIntFunc(inst interface{}, field IField, value interface{}) error
- func FieldSetIntFuncV(instV reflect.Value, field IField, value interface{}) error
- func FieldSetMapFunc(inst interface{}, field IField, value interface{}) error
- func FieldSetMapFuncV(instV reflect.Value, field IField, value interface{}) error
- func FieldSetPtrFunc(inst interface{}, field IField, value interface{}) error
- func FieldSetPtrFuncV(instV reflect.Value, field IField, value interface{}) error
- func FieldSetSliceFunc(inst interface{}, field IField, value interface{}) error
- func FieldSetSliceFuncV(instV reflect.Value, field IField, value interface{}) error
- func FieldSetStringFunc(inst interface{}, field IField, value interface{}) error
- func FieldSetStringFuncV(instV reflect.Value, field IField, value interface{}) error
- func FieldSetStructFunc(inst interface{}, field IField, value interface{}) error
- func FieldSetStructFuncV(instV reflect.Value, field IField, value interface{}) error
- func FieldSetUIntPtrFunc(inst interface{}, field IField, value interface{}) error
- func FieldSetUIntPtrFuncV(instV reflect.Value, field IField, value interface{}) error
- func FieldSetUint16Func(inst interface{}, field IField, value interface{}) error
- func FieldSetUint16FuncV(instV reflect.Value, field IField, value interface{}) error
- func FieldSetUint32Func(inst interface{}, field IField, value interface{}) error
- func FieldSetUint32FuncV(instV reflect.Value, field IField, value interface{}) error
- func FieldSetUint64Func(inst interface{}, field IField, value interface{}) error
- func FieldSetUint64FuncV(instV reflect.Value, field IField, value interface{}) error
- func FieldSetUint8Func(inst interface{}, field IField, value interface{}) error
- func FieldSetUint8FuncV(instV reflect.Value, field IField, value interface{}) error
- func FieldSetUintFunc(inst interface{}, field IField, value interface{}) error
- func FieldSetUintFuncV(instV reflect.Value, field IField, value interface{}) error
- func GetStructInstValue(inst interface{}) (reflect.Value, error)
- func LeFillUpSize(b []byte, l int) []byte
- func MapField(structPtr interface{}, priority []string, recursive bool) (map[string]IField, error)
- func MemberGetInt8FuncVT(instV reflect.Value, field IField) int8
- func MemberGetUintFuncVT(instV reflect.Value, field IField) uint
- func TagMapField(structPtr interface{}, priority []string, recursive bool) (map[string]IField, error)
- func TagMapName(structPtr interface{}, priority []string, recursive bool) (map[string]string, error)
- type FieldGetFunc
- type FieldGetFuncV
- type FieldSetFunc
- type FieldSetFuncV
- type FieldTag
- type IField
- type IMapField
- type IPtrField
- type ISliceField
- type IStructField
- type MethodInfo
- func (mi *MethodInfo) InParams() *MethodParams
- func (mi *MethodInfo) Index() int
- func (mi *MethodInfo) Invoke(params ...interface{}) (result []interface{}, err error)
- func (mi *MethodInfo) Name() string
- func (mi *MethodInfo) OutParams() *MethodParams
- func (mi *MethodInfo) OwnerName() string
- func (mi *MethodInfo) SetInParams(params *MethodParams)
- func (mi *MethodInfo) SetOutParams(params *MethodParams)
- func (mi *MethodInfo) String() string
- type MethodParams
- func (mp *MethodParams) Add(item reflect.Type)
- func (mp *MethodParams) CheckValues(instance interface{}, values ...interface{}) (bool, error)
- func (mp *MethodParams) Clear()
- func (mp *MethodParams) Count() int
- func (mp *MethodParams) Items() []reflect.Type
- func (mp *MethodParams) Set(index int, item reflect.Type)
- func (mp *MethodParams) String() string
- type TField
- func (f *TField) Get(inst ...interface{}) interface{}
- func (f *TField) GetV(instValue ...reflect.Value) interface{}
- func (f *TField) Index() []int
- func (f *TField) Init(inst interface{}) IField
- func (f *TField) Name() string
- func (f *TField) Offset() uintptr
- func (f *TField) Self() interface{}
- func (f *TField) Set(val interface{}, inst ...interface{})
- func (f *TField) SetV(val interface{}, instValue ...reflect.Value)
- func (f *TField) String() string
- func (f *TField) Tag() *FieldTag
- func (f *TField) Type() reflect.Type
- func (f *TField) Value() reflect.Value
- type TMapField
- type TPtrField
- type TSliceField
- type TStruct
- func (s *TStruct) AppendResult(arg map[string]interface{})
- func (s *TStruct) Call(method string, params ...interface{}) (result []interface{}, err error)
- func (s *TStruct) Field(fieldName string) IField
- func (s *TStruct) FieldMap() map[string]IField
- func (s *TStruct) Fields() []IField
- func (s *TStruct) GetFieldVal(fieldName string) interface{}
- func (s *TStruct) GetResult() []map[string]interface{}
- func (s *TStruct) HasField(fieldName string) bool
- func (s *TStruct) HasMethod(method string) bool
- func (s *TStruct) Instance() interface{}
- func (s *TStruct) Method(method string) *MethodInfo
- func (s *TStruct) MethodMap() map[string]*MethodInfo
- func (s *TStruct) Methods() []*MethodInfo
- func (s *TStruct) Name() string
- func (s *TStruct) SetExtraCols(args []string) *TStruct
- func (s *TStruct) SetFieldVal(fieldName string, val interface{})
- func (s *TStruct) SetResult(arg []map[string]interface{})
- func (s *TStruct) StructContent2Map(data interface{}) []map[string]interface{}
- func (s *TStruct) TagName() string
- type TStructField
- type TagValue
Constants ¶
View Source
const StrCallParamNumErrorMsg = "%s.%s需要%d个参数,实际传入%d个参数,参数类型不匹配"
View Source
const StrCallParamTypeErrorMsg = "%s.%s第%d个形参为%s类型,调用实参为%s类型,参数类型不匹配"
Variables ¶
This section is empty.
Functions ¶
func FieldGetBoolFunc ¶
func FieldGetBoolFuncV ¶
func FieldGetChanFunc ¶
func FieldGetChanFuncV ¶
func FieldGetComplex128Func ¶
func FieldGetComplex128FuncV ¶
func FieldGetComplex128FuncVT ¶
func FieldGetComplex128FuncVT(instV reflect.Value, field IField) complex128
func FieldGetComplex64Func ¶
func FieldGetComplex64FuncV ¶
func FieldGetComplex64FuncVT ¶
func FieldGetFloat32Func ¶
func FieldGetFloat32FuncV ¶
func FieldGetFloat64Func ¶
func FieldGetFloat64FuncV ¶
func FieldGetInt16Func ¶
func FieldGetInt16FuncV ¶
func FieldGetInt32Func ¶
func FieldGetInt32FuncV ¶
func FieldGetInt64Func ¶
func FieldGetInt64FuncV ¶
func FieldGetInt8Func ¶
func FieldGetInt8FuncV ¶
func FieldGetIntFunc ¶
func FieldGetIntFuncV ¶
func FieldGetInterfaceFunc ¶
func FieldGetInterfaceFuncV ¶
func FieldGetMapFunc ¶
func FieldGetMapFuncV ¶
func FieldGetSliceFunc ¶
func FieldGetSliceFuncV ¶
func FieldGetStringFunc ¶
func FieldGetStringFuncV ¶
func FieldGetUint16Func ¶
func FieldGetUint16FuncV ¶
func FieldGetUint32Func ¶
func FieldGetUint32FuncV ¶
func FieldGetUint64Func ¶
func FieldGetUint64FuncV ¶
func FieldGetUint8Func ¶
func FieldGetUint8FuncV ¶
func FieldGetUintFunc ¶
func FieldGetUintFuncV ¶
func FieldSetBoolFunc ¶
func FieldSetBoolFuncV ¶
func FieldSetChanFunc ¶
func FieldSetChanFuncV ¶
func FieldSetComplex128Func ¶
func FieldSetComplex128FuncV ¶
func FieldSetComplex64Func ¶
func FieldSetComplex64FuncV ¶
func FieldSetFloat32Func ¶
func FieldSetFloat32FuncV ¶
func FieldSetFloat64Func ¶
func FieldSetFloat64FuncV ¶
func FieldSetInt16Func ¶
func FieldSetInt16FuncV ¶
func FieldSetInt32Func ¶
func FieldSetInt32FuncV ¶
func FieldSetInt64Func ¶
func FieldSetInt64FuncV ¶
func FieldSetInt8Func ¶
func FieldSetInt8FuncV ¶
func FieldSetIntFunc ¶
func FieldSetIntFuncV ¶
func FieldSetMapFunc ¶
func FieldSetMapFuncV ¶
func FieldSetPtrFunc ¶
func FieldSetPtrFuncV ¶
func FieldSetSliceFunc ¶
func FieldSetSliceFuncV ¶
func FieldSetStringFunc ¶
func FieldSetStringFuncV ¶
func FieldSetStructFunc ¶
func FieldSetStructFuncV ¶
func FieldSetUIntPtrFunc ¶
func FieldSetUIntPtrFuncV ¶
func FieldSetUint16Func ¶
func FieldSetUint16FuncV ¶
func FieldSetUint32Func ¶
func FieldSetUint32FuncV ¶
func FieldSetUint64Func ¶
func FieldSetUint64FuncV ¶
func FieldSetUint8Func ¶
func FieldSetUint8FuncV ¶
func FieldSetUintFunc ¶
func FieldSetUintFuncV ¶
func GetStructInstValue ¶
func LeFillUpSize ¶
当b位数不够时,进行高位补0。 注意这里为了不影响原有输入参数,是采用的值复制设计。
Types ¶
type FieldGetFunc ¶
type FieldGetFuncV ¶
type FieldSetFunc ¶
struct字段值设置函数
type FieldSetFuncV ¶
type FieldTag ¶
type FieldTag struct {
// contains filtered or unexported fields
}
func NewFieldTag ¶
type IField ¶
type IField interface { Name() string Value() reflect.Value Tag() *FieldTag Type() reflect.Type Offset() uintptr Index() []int Get(inst ...interface{}) interface{} GetV(instValue ...reflect.Value) interface{} Set(val interface{}, inst ...interface{}) SetV(val interface{}, instValue ...reflect.Value) Init(inst interface{}) IField Self() interface{} }
func NewField ¶
func NewField(name string, tag string, typ reflect.Type, val reflect.Value, index []int, offset uintptr, extends ...reflect.Type) (IField, error)
创建struct字段信息记录
func SliceStruct ¶
type ISliceField ¶
type IStructField ¶
type MethodInfo ¶
type MethodInfo struct {
// contains filtered or unexported fields
}
func NewMethodInfo ¶
func NewMethodInfo(instance interface{}, instValue reflect.Value, name string, idx int) *MethodInfo
func (*MethodInfo) InParams ¶
func (mi *MethodInfo) InParams() *MethodParams
func (*MethodInfo) Index ¶
func (mi *MethodInfo) Index() int
func (*MethodInfo) Invoke ¶
func (mi *MethodInfo) Invoke(params ...interface{}) (result []interface{}, err error)
调用方法
func (*MethodInfo) Name ¶
func (mi *MethodInfo) Name() string
func (*MethodInfo) OutParams ¶
func (mi *MethodInfo) OutParams() *MethodParams
func (*MethodInfo) OwnerName ¶
func (mi *MethodInfo) OwnerName() string
func (*MethodInfo) SetInParams ¶
func (mi *MethodInfo) SetInParams(params *MethodParams)
func (*MethodInfo) SetOutParams ¶
func (mi *MethodInfo) SetOutParams(params *MethodParams)
func (*MethodInfo) String ¶
func (mi *MethodInfo) String() string
type MethodParams ¶
type MethodParams struct {
// contains filtered or unexported fields
}
func NewMethodParams ¶
func NewMethodParams(mi *MethodInfo, paramCount int) *MethodParams
func (*MethodParams) Add ¶
func (mp *MethodParams) Add(item reflect.Type)
func (*MethodParams) CheckValues ¶
func (mp *MethodParams) CheckValues(instance interface{}, values ...interface{}) (bool, error)
func (*MethodParams) Clear ¶
func (mp *MethodParams) Clear()
func (*MethodParams) Count ¶
func (mp *MethodParams) Count() int
func (*MethodParams) Items ¶
func (mp *MethodParams) Items() []reflect.Type
func (*MethodParams) String ¶
func (mp *MethodParams) String() string
type TPtrField ¶
type TPtrField struct { TField // contains filtered or unexported fields }
func (*TPtrField) OriginType ¶
type TSliceField ¶
type TSliceField struct { TField // contains filtered or unexported fields }
func (*TSliceField) ItemType ¶
func (sf *TSliceField) ItemType() reflect.Type
func (*TSliceField) String ¶
func (sf *TSliceField) String() string
type TStruct ¶
type TStruct struct { ExtraCols []string // contains filtered or unexported fields }
func (*TStruct) AppendResult ¶
func (*TStruct) GetFieldVal ¶
func (*TStruct) Method ¶
func (s *TStruct) Method(method string) *MethodInfo
func (*TStruct) MethodMap ¶
func (s *TStruct) MethodMap() map[string]*MethodInfo
func (*TStruct) Methods ¶
func (s *TStruct) Methods() []*MethodInfo
func (*TStruct) SetExtraCols ¶
func (*TStruct) SetFieldVal ¶
func (*TStruct) StructContent2Map ¶
type TStructField ¶
type TStructField struct { TField // contains filtered or unexported fields }
func (*TStructField) String ¶
func (sf *TStructField) String() string
func (*TStructField) StructType ¶
func (sf *TStructField) StructType() reflect.Type
Source Files
¶
Click to show internal directories.
Click to hide internal directories.