api

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SortParameterFieldJobNumber is the name of the field,
	// job number, in the sort parameter.
	SortParameterFieldJobNumber SortParameterField = "job_number"
	// SortParameterFieldLabel is the name of the field,
	// label, in the sort parameter.
	SortParameterFieldLabel SortParameterField = "label"
	// SortParameterDirectionAsc is the name of the direction,
	// ascending, in the sort parameter.
	SortParameterDirectionAsc SortParameterDirection = "asc"
	// SortParameterDirectionDesc is the name of the direction,
	// descending, in the sort parameter.
	SortParameterDirectionDesc SortParameterDirection = "desc"
)

Variables

This section is empty.

Functions

func IsValidSortParameter

func IsValidSortParameter[SortParameter comparable](parameter SortParameter, validParameters []SortParameter) bool

IsValidSortParameter validates sort parameter fields, and checks they are correct.

func ParseSortParameters

func ParseSortParameters(sortParam []string) (field SortParameterField, direction SortParameterDirection, err error)

ParseSortParameters parses the sort parameters of the form "field:direction"

Types

type SortParameterDirection

type SortParameterDirection string

SortParameterDirection is the direction which you are sorting by

type SortParameterField

type SortParameterField string

SortParameterField is the field you are sorting by

Jump to

Keyboard shortcuts

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