Documentation ¶
Index ¶
Constants ¶
View Source
const ( FilterKeyBrand = "brand" FilterKeyPrice = "price" )
View Source
const ( FilterOperatorEqual = "eq" FilterOperatorGreaterThanEqual = "gte" FilterOperatorLowerThanEqual = "lte" )
View Source
const ( PaginationOffsetDefault = 0 PaginationLimitDefault = 10 RequestParameterOffset = "offset" RequestParameterLimit = "limit" )
View Source
const ( SortingFieldDefault = "price" SortingOrderDefault = "asc" )
View Source
const RequestParameterQuery = "q"
View Source
const RequestParameterSorting = "sort"
View Source
const SearchTitle = "title"
Variables ¶
View Source
var AvailableFilterKeys = []string{ FilterKeyBrand, FilterKeyPrice, }
View Source
var SearchFields = []string{SearchTitle}
Functions ¶
Types ¶
type Pagination ¶
func NewPagination ¶
func NewPagination(r *http.Request) *Pagination
Click to show internal directories.
Click to hide internal directories.