Documentation
¶
Index ¶
- func AssignBoolValue(data any, val reflect.Value) error
- func AssignFloat64Value(data any, val reflect.Value) error
- func AssignInt64Value(data any, val reflect.Value) error
- func AssignStringValue(data any, val reflect.Value) error
- func AssignUint64Value(data any, val reflect.Value) error
- func GroupTypeKind(t reflect.Type) reflect.Kind
- func GroupValueKind(v reflect.Value) reflect.Kind
- func IsSliceTypeOf(t reflect.Type, elementKind reflect.Kind) bool
- func IsSliceValueOf(v reflect.Value, elementKind reflect.Kind) bool
- func IsTypeFloat(t reflect.Type) bool
- func IsTypeInteger(t reflect.Type) bool
- func IsTypeStructOrStructPointer(t reflect.Type) bool
- func IsTypeStructPointer(t reflect.Type) bool
- func IsTypeStructSliceOrStructSlicePointer(t reflect.Type) bool
- func IsTypeTime(t reflect.Type) bool
- func IsTypeTimePointer(t reflect.Type) bool
- func IsTypeUnsignedInteger(t reflect.Type) bool
- func IsValueFloat(v reflect.Value) bool
- func IsValueInteger(v reflect.Value) bool
- func IsValueStructOrStructPointer(v reflect.Value) bool
- func IsValueStructPointer(v reflect.Value) bool
- func IsValueStructSliceOrStructSlicePointer(v reflect.Value) bool
- func IsValueTime(v reflect.Value) bool
- func IsValueTimePointer(v reflect.Value) bool
- func IsValueUnsignedInteger(v reflect.Value) bool
- func PointerTypeElem(t reflect.Type) reflect.Type
- func PointerValueElem(v reflect.Value) reflect.Value
- func SliceTypeElem(t reflect.Type) reflect.Type
- func SliceValueElem(v reflect.Value) reflect.Value
- func ToBool(data any) (bool, error)
- func ToFloat64(data any) (float64, error)
- func ToInt64(data any) (int64, error)
- func ToString(data any) (string, error)
- func ToUint64(data any) (uint64, error)
- func Zero[T any]() T
- func ZeroValueToAny(v reflect.Value) any
- type Function
- type FunctionDefinition
- type Struct
- func (s *Struct) Any() any
- func (s *Struct) CallMethod(methodName string, args ...any) []any
- func (s *Struct) FieldValue(fieldName string) any
- func (s *Struct) FieldValues(fieldNames ...string) map[string]any
- func (s *Struct) MakeMethod(methods ...StructMethodDefinition)
- func (s *Struct) Pointer() any
- func (s *Struct) SetFieldValue(fieldName string, value any)
- func (s *Struct) SetFieldValues(fieldAndValues map[string]any)
- type StructFieldDefinition
- type StructMethodDefinition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssignBoolValue ¶
AssignBoolValue 将any类型的值进行转化,赋值给bool类型的reflect.Value
func AssignFloat64Value ¶ added in v1.5.6
AssignFloat64Value 将any类型的值进行转化,赋值给float64类型的reflect.Value
func AssignInt64Value ¶ added in v1.5.6
AssignInt64Value 将any类型的值进行转化,赋值给int64类型的reflect.Value
func AssignStringValue ¶
AssignStringValue 将any类型的值进行转化,赋值给string的reflect.Value
func AssignUint64Value ¶ added in v1.5.6
AssignUint64Value 将any类型的值进行转化,赋值给uint64类型的reflect.Value
func GroupTypeKind ¶ added in v1.5.8
GroupTypeKind 将反射的Kind值进行聚集
func GroupValueKind ¶
GroupValueKind 将反射的Kind值进行聚集
func IsSliceTypeOf ¶ added in v1.5.8
func IsSliceValueOf ¶ added in v1.5.8
func IsTypeFloat ¶ added in v1.5.8
func IsTypeInteger ¶ added in v1.5.8
func IsTypeStructOrStructPointer ¶ added in v1.5.8
func IsTypeStructPointer ¶ added in v1.5.8
func IsTypeStructSliceOrStructSlicePointer ¶ added in v1.5.9
func IsTypeTime ¶ added in v1.5.8
func IsTypeTimePointer ¶ added in v1.5.8
func IsTypeUnsignedInteger ¶ added in v1.5.8
func IsValueFloat ¶ added in v1.5.8
func IsValueInteger ¶ added in v1.5.8
func IsValueStructOrStructPointer ¶ added in v1.5.8
func IsValueStructPointer ¶ added in v1.5.8
func IsValueStructSliceOrStructSlicePointer ¶ added in v1.5.9
func IsValueTime ¶ added in v1.5.8
func IsValueTimePointer ¶ added in v1.5.8
func IsValueUnsignedInteger ¶ added in v1.5.8
func ZeroValueToAny ¶ added in v1.5.12
Types ¶
type Function ¶ added in v1.5.25
type Function struct {
// contains filtered or unexported fields
}
func MakeFunction ¶ added in v1.5.25
func MakeFunction(function FunctionDefinition) *Function
type FunctionDefinition ¶ added in v1.5.25
type Struct ¶ added in v1.5.25
type Struct struct {
// contains filtered or unexported fields
}
func NewStruct ¶ added in v1.5.25
func NewStruct(fields ...StructFieldDefinition) *Struct
func (*Struct) CallMethod ¶ added in v1.5.25
func (*Struct) FieldValue ¶ added in v1.5.25
func (*Struct) FieldValues ¶ added in v1.5.25
func (*Struct) MakeMethod ¶ added in v1.5.25
func (s *Struct) MakeMethod(methods ...StructMethodDefinition)
func (*Struct) SetFieldValue ¶ added in v1.5.25
func (*Struct) SetFieldValues ¶ added in v1.5.25
type StructFieldDefinition ¶ added in v1.5.25
Click to show internal directories.
Click to hide internal directories.