Documentation ¶
Index ¶
Constants ¶
View Source
const ( DEFAULT_PAGE_SIZE = 50 MAX_PAGE_SIZE = 100 GET_OPTION_KEY_PAGE = "page" GET_OPTION_KEY_PAGE_SIZE = "page_size" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pagination ¶
type Pagination struct { Page int `json:"page"` NumPages int `json:"numPages"` PageSize int `json:"pageSize"` Count int64 `json:"count"` }
Pagination Exports
func NewPagination ¶
func NewPagination(page, pageSize int, model *gorm.DB) *Pagination
NewPagination Exports
func PaginatorFromRequest ¶
func PaginatorFromRequest(r *http.Request, model *gorm.DB) *Pagination
Click to show internal directories.
Click to hide internal directories.