Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultPage int = 1 DefaultLimit int = 10 )
Variables ¶
This section is empty.
Functions ¶
func CalculatePageToOffset ¶
CalculatePageToOffset calculates offset based on page for query
page = 1 limit = 10 offset = 0
page = 2 limit = 10 offset = (2-1) * 10 = 10
page = 2 limit = 2 offset = (2- 1) * 2 = 2
page = 2 limit = 3 offset (2 - 1) * 3 = 3
func ParsePagination ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.