Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PageParam = "page" LimitParam = "limit" MaxLimit uint64 = 1000 )
Functions ¶
This section is empty.
Types ¶
type Pagination ¶
type Pagination struct { Page uint64 `json:"page"` Limit uint64 `json:"limit"` Total uint64 `json:"total"` Items interface{} `json:"items"` }
func New ¶
func New(page, limit uint64) *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() uint64
func (*Pagination) PageCount ¶
func (p *Pagination) PageCount() uint64
func (*Pagination) PrevURL ¶
func (p *Pagination) PrevURL() *url.URL
Click to show internal directories.
Click to hide internal directories.