sorter

package
v2.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2019 License: GPL-3.0, GPL-3.0-or-later Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sorter

type Sorter struct {
	// contains filtered or unexported fields
}

Sorter represents a sorter applied to aggregators

func (*Sorter) GetPosition

func (s *Sorter) GetPosition() int

GetPosition return element position

func (*Sorter) HasPosition

func (s *Sorter) HasPosition(position int) bool

HasPosition check if position exists

func (*Sorter) Len

func (s *Sorter) Len() int

func (*Sorter) Less

func (s *Sorter) Less(i, j int) bool

func (*Sorter) SetAggregators

func (s *Sorter) SetAggregators(aggregators *aggregator.Aggregators)

SetAggregators populate aggregators

func (*Sorter) Swap

func (s *Sorter) Swap(i, j int)

type Sorters

type Sorters []*Sorter

Sorters list all sorters to apply to positions

func NewSorters

func NewSorters() *Sorters

NewSorters create sorter list

func (*Sorters) Append

func (s *Sorters) Append(position int, sorterName string, args []string)

Append sort operation

func (*Sorters) Sort

func (s *Sorters) Sort(aggregators *aggregator.Aggregators)

Sort aggregators using provided sorters

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL