Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // SortOptionsByQueryParam is a map to translate the "sort" query param values to SortOption(s) SortOptionsByQueryParam = map[string]model.SortOption{ "userAgent-asc": newSortOption("user_agent", false, 0), "userAgent-desc": newSortOption("user_agent", true, 0), "updatedAt-asc": newTimeSortOption("updated_at", false, 1), "updatedAt-desc": newTimeSortOption("updated_at", true, 2), } ErrorUnknownSortingOption = errutil.BadRequest("unknown sorting option") )
Functions ¶
func ParseSortQueryParam ¶
func ParseSortQueryParam(param string) ([]model.SortOption, error)
ParseSortQueryParam parses the "sort" query param and returns an ordered list of SortOption(s)
Types ¶
Click to show internal directories.
Click to hide internal directories.