order

package
v0.0.0-...-9d47661 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ASC  = "ASC"
	DESC = "DESC"
)

Set of directions for data ordering

Variables

This section is empty.

Functions

This section is empty.

Types

type By

type By struct {
	Field     string
	Direction string
}

By repesents a field used to order by and direction.

func NewBy

func NewBy(field string, direction string) By

NewBy constructs a new By value with no checks.

func Parse

func Parse(r *http.Request, defaultOrder By) (By, error)

Parse constructs a order.By value by parsing a string in the form of "field,direction".

Jump to

Keyboard shortcuts

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