Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidValue occurs when value is in invalid format ErrInvalidValue = errors.New("invalid value") // ErrMaxPageSizeExceeded occurs when pagesize read is above defined limit ErrMaxPageSizeExceeded = errors.New("maximum page size exceeded") // ErrPageSizeInvalid occurs when pagesize read is equal to 0 ErrPageSizeInvalid = errors.New("page size must be greater than zero") )
View Source
var ( // ErrInvalidInteger occurs when value is not an integer ErrInvalidInteger = errors.New("invalid unsigned integer value for ID") )
Functions ¶
Types ¶
type Pagination ¶
Pagination describes pagination params
func ParsePagination ¶
func ParsePagination(r *http.Request, defaultPageSize, maxPageSize uint) (pagination Pagination, err error)
ParsePagination parse common pagination param from request
func (Pagination) LinkNextHeader ¶ added in v4.12.0
func (p Pagination) LinkNextHeader(urlPath string, extraArgs url.Values) string
LinkNextHeader returns next header for pagination
Click to show internal directories.
Click to hide internal directories.