Documentation ¶ Index ¶ Variables type Paginator func NewPaginator(page, perPage, totalItems int) *Paginator func (p *Paginator) Limit() int func (p *Paginator) Offset() int Constants ¶ This section is empty. Variables ¶ View Source var ( DefaultPageSize = 10 MaxPageSize = 100 ) Functions ¶ This section is empty. Types ¶ type Paginator ¶ type Paginator struct { Page int `json:"page,omitempty"` PerPage int `json:"per_page,omitempty"` TotalPages int `json:"total_pages,omitempty"` TotalItems int `json:"total_items,omitempty"` } func NewPaginator ¶ func NewPaginator(page, perPage, totalItems int) *Paginator func (*Paginator) Limit ¶ func (p *Paginator) Limit() int func (*Paginator) Offset ¶ func (p *Paginator) Offset() int Source Files ¶ View all Source files paginator.go Click to show internal directories. Click to hide internal directories.