Documentation ¶
Index ¶
- Constants
- func IsValidSortDirection(direction SortDirection) bool
- func ToSlice(ctx context.Context, scope *core.Scope, iterator Iterator) ([]*core.Scope, error)
- type Collection
- type CollectionIterator
- type Comparator
- type FilterIterator
- type FilterPredicate
- type HTMLNodeIterator
- type IndexedCollection
- type IndexedIterator
- type Iterable
- type IterableCollection
- type Iterator
- func NewCollectionIterator(valVar, keyVar string, values CollectionIterator) (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 NewHTMLNodeIterator(valVar, keyVar string, values values.HTMLNode) (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)
- type KeyedCollection
- type KeyedIterator
- type LimitIterator
- type MapIterator
- type SliceIterator
- type SortDirection
- type SortIterator
- type Sorter
- type TapIterator
- type UniqueIterator
Constants ¶
View Source
const ( DefaultValueVar = "value" DefaultKeyVar = "key" )
Variables ¶
This section is empty.
Functions ¶
func IsValidSortDirection ¶
func IsValidSortDirection(direction SortDirection) bool
Types ¶
type CollectionIterator ¶ added in v0.5.0
type FilterIterator ¶
type FilterIterator struct {
// contains filtered or unexported fields
}
func NewFilterIterator ¶
func NewFilterIterator(values Iterator, predicate FilterPredicate) (*FilterIterator, error)
type FilterPredicate ¶
type HTMLNodeIterator ¶
type HTMLNodeIterator struct {
// contains filtered or unexported fields
}
type IndexedCollection ¶ added in v0.4.0
type IndexedIterator ¶ added in v0.4.0
type IndexedIterator struct {
// contains filtered or unexported fields
}
type IterableCollection ¶ added in v0.5.0
type Iterator ¶
func NewCollectionIterator ¶ added in v0.5.0
func NewCollectionIterator( valVar, keyVar string, values CollectionIterator, ) (Iterator, error)
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 NewHTMLNodeIterator ¶
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)
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 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)
Click to show internal directories.
Click to hide internal directories.