sorter

package
v0.0.0-...-f4c9d17 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Expression

type Expression struct {
	Left  *Field   `@@`
	Right []*Field `("," @@)*`
}

func NewExpression

func NewExpression(sorter string) (*Expression, error)

func (*Expression) BuildSorter

func (e *Expression) BuildSorter() model.MergeReqSorter

type Field

type Field struct {
	Reverse bool `@("!")?`
	Name    Name `@Name`
}

func (*Field) BuildSorter

func (f *Field) BuildSorter() model.MergeReqSorter

type Name

type Name int
const (
	NameID Name = iota
	NameAge
	NameActivity
	NameTitle
	NameRealName
	NameUserName
	NameProject
)

func (*Name) BuildSorter

func (n *Name) BuildSorter() model.MergeReqSorter

func (*Name) Capture

func (n *Name) Capture(str []string) error

type SorterInfo

type SorterInfo struct {
	Expression string
	Comparator model.MergeReqSorter
	Error      error
}

func BuildSorter

func BuildSorter(sorterexpr string) SorterInfo

Jump to

Keyboard shortcuts

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