Documentation ¶
Index ¶
- Variables
- func Deref(t reflect.Type) reflect.Type
- func FieldByIndexes(v reflect.Value, indexes []int) reflect.Value
- func FieldByIndexesReadOnly(v reflect.Value, indexes []int) reflect.Value
- func Indirect(v reflect.Value) reflect.Value
- func IndirectInit(v reflect.Value) reflect.Value
- func Init(v reflect.Value) reflect.Value
- func IsKind(t reflect.Type, k reflect.Kind) bool
- func IsNull(v reflect.Value) bool
- func IsNullable(t reflect.Type) bool
- func IsZero(v reflect.Value) bool
- func Set(src, v reflect.Value)
- func TypeOf(i interface{}) reflect.Type
- func ValueOf(i interface{}) reflect.Value
- func Zero(t reflect.Type) (v reflect.Value)
- type Fields
- type FormatFunc
- type MapFunc
- type Mapper
- func (m *Mapper) CodecByType(t reflect.Type) Structer
- func (m *Mapper) FieldByIndexes(v reflect.Value, idxs []int) reflect.Value
- func (m *Mapper) FieldByIndexesReadOnly(v reflect.Value, idxs []int) reflect.Value
- func (m *Mapper) FieldByName(v reflect.Value, name string) reflect.Value
- func (m *Mapper) LookUpFieldByName(v reflect.Value, name string) (reflect.Value, bool)
- func (m *Mapper) TraversalsByName(t reflect.Type, names []string) (idxs [][]int)
- func (m *Mapper) TraversalsByNameFunc(t reflect.Type, names []string, fn func(int, []int)) (idxs [][]int)
- type Struct
- type StructField
- func (sf *StructField) Children() []StructFielder
- func (sf *StructField) Index() []int
- func (sf *StructField) IsEmbedded() bool
- func (sf *StructField) IsNullable() bool
- func (sf *StructField) Name() string
- func (sf *StructField) Parent() StructFielder
- func (sf *StructField) ParentByTraversal(cb func(StructFielder) bool) StructFielder
- func (sf *StructField) Tag() StructTag
- func (sf *StructField) Type() reflect.Type
- type StructFielder
- type StructMapper
- type StructTag
- type Structer
- type Zeroer
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultMapper = NewMapperFunc("sqlike", nil)
DefaultMapper :
Functions ¶
func FieldByIndexes ¶
FieldByIndexes :
func FieldByIndexesReadOnly ¶
FieldByIndexesReadOnly :
Types ¶
type Mapper ¶
type Mapper struct {
// contains filtered or unexported fields
}
Mapper :
func (*Mapper) FieldByIndexes ¶
FieldByIndexes :
func (*Mapper) FieldByIndexesReadOnly ¶
FieldByIndexesReadOnly :
func (*Mapper) FieldByName ¶
FieldByName :
func (*Mapper) LookUpFieldByName ¶
LookUpFieldByName :
func (*Mapper) TraversalsByName ¶
TraversalsByName :
type Struct ¶
type Struct struct {
// contains filtered or unexported fields
}
Struct :
func (*Struct) GetByTraversal ¶
func (s *Struct) GetByTraversal(index []int) StructFielder
GetByTraversal :
func (*Struct) LookUpFieldByName ¶ added in v1.1.1
func (s *Struct) LookUpFieldByName(name string) (StructFielder, bool)
LookUpFieldByName :
type StructField ¶
type StructField struct {
// contains filtered or unexported fields
}
StructField :
func (*StructField) Children ¶
func (sf *StructField) Children() []StructFielder
func (*StructField) IsEmbedded ¶ added in v1.1.1
func (sf *StructField) IsEmbedded() bool
func (*StructField) IsNullable ¶
func (sf *StructField) IsNullable() bool
func (*StructField) ParentByTraversal ¶
func (sf *StructField) ParentByTraversal(cb func(StructFielder) bool) StructFielder
ParentByTraversal :
type StructFielder ¶ added in v1.1.1
type StructFielder interface { Name() string // New name of struct field Type() reflect.Type Index() []int Tag() StructTag Parent() StructFielder ParentByTraversal(cb func(StructFielder) bool) StructFielder Children() []StructFielder IsNullable() bool IsEmbedded() bool }
type StructMapper ¶ added in v1.0.2
type StructMapper interface { CodecByType(t reflect.Type) Structer FieldByName(v reflect.Value, name string) reflect.Value FieldByIndexes(v reflect.Value, idxs []int) reflect.Value FieldByIndexesReadOnly(v reflect.Value, idxs []int) reflect.Value LookUpFieldByName(v reflect.Value, name string) (reflect.Value, bool) TraversalsByName(t reflect.Type, names []string) (idxs [][]int) TraversalsByNameFunc(t reflect.Type, names []string, fn func(int, []int)) (idxs [][]int) }
StructMapper :
type Structer ¶ added in v1.1.1
type Structer interface { Fields() []StructFielder Properties() []StructFielder LookUpFieldByName(name string) (StructFielder, bool) GetByTraversal(index []int) StructFielder }
Click to show internal directories.
Click to hide internal directories.