package
Version:
v0.0.0-...-8d7bd48
Opens a new window with list of versions in this module.
Published: May 11, 2023
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package paging provides support for query paging.
type Page struct {
Number int
RowsPerPage int
}
Page represents the requested page and rows per page.
ParseRequest parses the request for the page and rows query string. The
defaults are provided as well.
type Response[T any] struct {
Items []T `json:"items"`
Total int `json:"total"`
Page int `json:"page"`
RowsPerPage int `json:"rowsPerPage"`
}
Response is what is returned when a query call is performed.
NewResponse constructs a response value for a web response.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.