Documentation ¶
Index ¶
- func ByFieldIndex(n FieldIndex) func(i interface{}) interface{}
- func ByHost() func(i interface{}) interface{}
- func ByKey() func(i interface{}) interface{}
- func ByLen() func(i interface{}) interface{}
- func FieldIndexValue(i FieldIndex, v interface{}) interface{}
- func FromChannelQuery(ch chan interface{}, opt *Options) linq.Query
- func GroupBy(groupBy FieldIndex) (func(i interface{}) interface{}, func(i interface{}) interface{})
- func JsonFieldIndexTree(v interface{}) *radix.Tree
- func OrderBy(groupBy, orderBy FieldIndex) func(i interface{}) interface{}
- func ValidFieldValue(t *radix.Tree, keys []string, v interface{}) interface{}
- type Cached
- type Element
- type Elements
- type FieldIndex
- type Options
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByFieldIndex ¶
func ByFieldIndex(n FieldIndex) func(i interface{}) interface{}
Order by the field
func FieldIndexValue ¶
func FieldIndexValue(i FieldIndex, v interface{}) interface{}
Get actual value of struct field by its index
func FromChannelQuery ¶
func FromChannelQuery(ch chan interface{}, opt *Options) linq.Query
func GroupBy ¶
func GroupBy(groupBy FieldIndex) (func(i interface{}) interface{}, func(i interface{}) interface{})
func JsonFieldIndexTree ¶
func JsonFieldIndexTree(v interface{}) *radix.Tree
Create a radix tree of struct fields' json tags and their indices
func OrderBy ¶
func OrderBy(groupBy, orderBy FieldIndex) func(i interface{}) interface{}
func ValidFieldValue ¶
func ValidFieldValue(t *radix.Tree, keys []string, v interface{}) interface{}
Get actual value of any valid struct field in _keys_ slice Panic if all fields are invalid or not found
Types ¶
type FieldIndex ¶
type FieldIndex []int
Represents an index of struct field for (reflect.Value).FieldByIndex func
func (FieldIndex) Equal ¶
func (f FieldIndex) Equal(other FieldIndex) bool
Check equality of FieldIndex slices
func (FieldIndex) Negative ¶
func (f FieldIndex) Negative() bool
Check if struct really has a field (it must have positive indices)
Click to show internal directories.
Click to hide internal directories.