sorts

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 26, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Order

type Order int

Order is the enum used for the sorting values

const (
	// AscendingOrder defines the sorting ascending order
	AscendingOrder Order = iota

	// DescendingOrder defines the sorting descending order
	DescendingOrder
)

func (Order) String

func (o Order) String() string

String implements Stringer interface

type SortField

type SortField sorts.SortField

SortField is a field that contains sorting information

func (*SortField) FormatQuery

func (s *SortField) FormatQuery(q ...url.Values) url.Values

FormatQuery returns the sort field formatted for url query. If the optional argument 'q' is provided the format would be set into the provdied url.Values. Otherwise it creates new url.Values instance. Returns modified url.Values

func (*SortField) Order

func (s *SortField) Order() Order

Order returns sortfield's order

func (*SortField) StructField

func (s *SortField) StructField() *mapping.StructField

StructField returns sortfield's structure

Jump to

Keyboard shortcuts

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