Documentation ¶
Index ¶
Constants ¶
View Source
const Key = "p"
Variables ¶
This section is empty.
Functions ¶
func GetCurrentPageNumber ¶
GetCurrentPageNumber returns the page number of the current page, and true if a valid page number was provided.
func GetOffset ¶
GetOffset returns the offset for a LIMIT query for page pageNumber if there are perPage items per page.
func GetPageCount ¶
GetPageCount returns the number of pages needed to fit n items if there are perPage items per page. If there are no items then that's still 1 page needed to show nothing.
Types ¶
type State ¶
type State struct { CurrentPage int TotalPages int FirstPageURL string NextPageURL string PreviousPageURL string LastPageURL string }
Click to show internal directories.
Click to hide internal directories.