Documentation ¶
Index ¶
- Constants
- func ForEach(ctx context.Context, scope *core.Scope, iter Iterator, ...) error
- func IsValidSortDirection(direction SortDirection) bool
- func ToSlice(ctx context.Context, scope *core.Scope, iterator Iterator) ([]*core.Scope, error)
- type Comparator
- type FilterIterator
- type FilterPredicate
- type IndexedCollection
- type IndexedIterator
- type Iterable
- type IterableFn
- type Iterator
- func AsIterator(fn func(ctx context.Context, scope *core.Scope) (*core.Scope, error)) Iterator
- func FromCoreIterator(valVar, keyVar string, iterator core.Iterator) (Iterator, error)
- func NewDefaultIndexedIterator(values IndexedCollection) (Iterator, error)
- func NewDefaultKeyedIterator(input KeyedCollection) (Iterator, error)
- func NewDefaultMapIterator(values map[string]core.Value) (Iterator, error)
- func NewDefaultSliceIterator(input []core.Value) (Iterator, error)
- func NewDefaultWhileIterator(mode WhileMode, predicate WhilePredicate) (Iterator, error)
- func NewIndexedIterator(valVar, keyVar string, values IndexedCollection) (Iterator, error)
- func NewKeyedIterator(valVar, keyVar string, values KeyedCollection) (Iterator, error)
- func NewMapIterator(valVar, keyVar string, values map[string]core.Value) (Iterator, error)
- func NewSliceIterator(valVar, keyVar string, values []core.Value) (Iterator, error)
- func NewTapIterator(values Iterator, predicate core.Expression) (Iterator, error)
- func NewWhileIterator(mode WhileMode, valVar string, predicate WhilePredicate) (Iterator, error)
- type IteratorFn
- type KeyedCollection
- type KeyedIterator
- type LimitIterator
- type MapIterator
- type Measurable
- type SliceIterator
- type SortDirection
- type SortIterator
- type Sorter
- type TapIterator
- type UniqueIterator
- type WhileIterator
- type WhileMode
- type WhilePredicate
Constants ¶
View Source
const ( DefaultValueVar = "value" DefaultKeyVar = "key" )
Variables ¶
This section is empty.
Functions ¶
func IsValidSortDirection ¶
func IsValidSortDirection(direction SortDirection) bool
Types ¶
type Comparator ¶
type FilterIterator ¶
type FilterIterator struct {
// contains filtered or unexported fields
}
func NewFilterIterator ¶
func NewFilterIterator(values Iterator, predicate FilterPredicate) (*FilterIterator, error)
type FilterPredicate ¶
type IndexedCollection ¶ added in v0.4.0
type IndexedIterator ¶ added in v0.4.0
type IndexedIterator struct {
// contains filtered or unexported fields
}
type Iterable ¶
func AsIterable ¶ added in v0.16.0
type IterableFn ¶ added in v0.16.0
type IterableFn struct {
// contains filtered or unexported fields
}
type Iterator ¶
func AsIterator ¶ added in v0.16.0
func FromCoreIterator ¶ added in v0.16.0
func NewDefaultIndexedIterator ¶ added in v0.4.0
func NewDefaultIndexedIterator( values IndexedCollection, ) (Iterator, error)
func NewDefaultKeyedIterator ¶ added in v0.4.0
func NewDefaultKeyedIterator(input KeyedCollection) (Iterator, error)
func NewDefaultMapIterator ¶ added in v0.4.0
func NewDefaultSliceIterator ¶ added in v0.4.0
func NewDefaultWhileIterator ¶ added in v0.13.0
func NewDefaultWhileIterator(mode WhileMode, predicate WhilePredicate) (Iterator, error)
func NewIndexedIterator ¶ added in v0.4.0
func NewIndexedIterator( valVar, keyVar string, values IndexedCollection, ) (Iterator, error)
func NewKeyedIterator ¶ added in v0.4.0
func NewKeyedIterator( valVar, keyVar string, values KeyedCollection, ) (Iterator, error)
func NewMapIterator ¶
func NewSliceIterator ¶
func NewTapIterator ¶ added in v0.5.0
func NewTapIterator(values Iterator, predicate core.Expression) (Iterator, error)
func NewWhileIterator ¶ added in v0.13.0
func NewWhileIterator( mode WhileMode, valVar string, predicate WhilePredicate, ) (Iterator, error)
type IteratorFn ¶ added in v0.16.0
type IteratorFn struct {
// contains filtered or unexported fields
}
type KeyedCollection ¶ added in v0.4.0
type KeyedIterator ¶ added in v0.4.0
type KeyedIterator struct {
// contains filtered or unexported fields
}
type LimitIterator ¶
type LimitIterator struct {
// contains filtered or unexported fields
}
func NewLimitIterator ¶
func NewLimitIterator(values Iterator, count, offset int) (*LimitIterator, error)
type MapIterator ¶
type MapIterator struct {
// contains filtered or unexported fields
}
type Measurable ¶ added in v0.7.0
Measurable represents an interface of a value that can has length.
type SliceIterator ¶
type SliceIterator struct {
// contains filtered or unexported fields
}
type SortDirection ¶
type SortDirection int
const ( SortDirectionAsc SortDirection = 1 SortDirectionDesc SortDirection = -1 )
func SortDirectionFromString ¶
func SortDirectionFromString(str string) SortDirection
type SortIterator ¶
type SortIterator struct {
// contains filtered or unexported fields
}
func NewSortIterator ¶
func NewSortIterator( values Iterator, comparators ...*Sorter, ) (*SortIterator, error)
type Sorter ¶
type Sorter struct {
// contains filtered or unexported fields
}
func NewSorter ¶
func NewSorter(fn Comparator, direction SortDirection) (*Sorter, error)
type TapIterator ¶ added in v0.5.0
type TapIterator struct {
// contains filtered or unexported fields
}
type UniqueIterator ¶
type UniqueIterator struct {
// contains filtered or unexported fields
}
func NewUniqueIterator ¶
func NewUniqueIterator(values Iterator, hashKey string) (*UniqueIterator, error)
type WhileIterator ¶ added in v0.13.0
type WhileIterator struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.