Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PageParam = "page" LimitParam = "limit" MaxLimit int = 1000 )
Functions ¶
This section is empty.
Types ¶
type Pagination ¶
type Pagination struct { Page int `json:"page"` Limit int `json:"limit"` Total int64 `json:"total"` Items interface{} `json:"items"` }
func New ¶
func New(page, limit int) *Pagination
func NewFromContext ¶
func NewFromContext(ctx *clevergo.Context) *Pagination
func (*Pagination) HasNext ¶
func (p *Pagination) HasNext() bool
func (*Pagination) HasPrev ¶
func (p *Pagination) HasPrev() bool
func (*Pagination) NextURL ¶
func (p *Pagination) NextURL() *url.URL
func (*Pagination) Offset ¶
func (p *Pagination) Offset() int
func (*Pagination) PageCount ¶
func (p *Pagination) PageCount() int
func (*Pagination) PrevURL ¶
func (p *Pagination) PrevURL() *url.URL
Click to show internal directories.
Click to hide internal directories.