Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFirstAndLastPages ¶
func GetFirstAndLastPages(req *http.Request, totalPages int) []coreModel.PageToDisplay
GetFirstAndLastPages returns the first and last pages of a paginated results
func GetOffset ¶
GetOffset returns the offset (0 based) into a list, given a page number (1 based) and the size of a page. A pageSize <= 0 or a pageNo <= 0 will give an offset of 0
func GetPagesToDisplay ¶
func GetPagesToDisplay(currentPage, totalPages int, req *http.Request) []coreModel.PageToDisplay
GetPagesToDisplay returns the pages to be displayed within the first and last pages
func GetTotalPages ¶
GetTotalPages returns the total pages from the total results count and pagesize parameters
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.