sort

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Ordered = Order{}

Functions

This section is empty.

Types

type Direction

type Direction int
const (
	ASC Direction = iota + 1
	DESC
	DefaultDirection Direction = ASC
)

func (Direction) Ascending

func (d Direction) Ascending() bool

func (Direction) Descending

func (d Direction) Descending() bool

func (Direction) ToString

func (d Direction) ToString() string

type Order

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

func (Order) Asc

func (o Order) Asc(property string) Order

func (Order) By

func (o Order) By(property string) Order

func (Order) ByProperties

func (o Order) ByProperties(direction Direction, properties ...string) (orders []Order)

func (Order) Desc

func (o Order) Desc(property string) Order

type Sort

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

func Sorted

func Sorted() *Sort

func (*Sort) Asc

func (s *Sort) Asc(property string) *Sort

func (*Sort) By

func (s *Sort) By(property string) *Sort

func (*Sort) ByOrder

func (s *Sort) ByOrder(orders ...Order) *Sort

func (*Sort) ByProperties

func (s *Sort) ByProperties(direction Direction, properties ...string) *Sort

func (*Sort) Desc

func (s *Sort) Desc(property string) *Sort

func (*Sort) FirstAscString

func (s *Sort) FirstAscString() (str string)

func (*Sort) Reset

func (s *Sort) Reset()

func (*Sort) ToString

func (s *Sort) ToString() (str string)

Jump to

Keyboard shortcuts

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