Documentation
¶
Index ¶
- Constants
- type Paginator
- func (p *Paginator) Current() int
- func (p *Paginator) GetURL() *url.URL
- func (p *Paginator) HasNext() bool
- func (p *Paginator) HasPrevious() bool
- func (p *Paginator) IsFirst() bool
- func (p *Paginator) IsLast() bool
- func (p *Paginator) Links() []string
- func (p *Paginator) Next() int
- func (p *Paginator) PageSize() int
- func (p *Paginator) Previous() int
- func (p *Paginator) SetURL(u *url.URL)
- func (p *Paginator) Total() int
- func (p *Paginator) TotalPages() int
Constants ¶
View Source
const ( // QueryParameterPage is URL query parameter to specify page number. QueryParameterPage = "page" // QueryParameterPage is URL query parameter to specify page size. QueryParameterPerPage = "per_page" // DefaultPageSize is a default number of items per page. DefaultPageSize = 20 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Paginator ¶
type Paginator struct {
// contains filtered or unexported fields
}
Paginator represents a set of results of pagination calculations.
func (*Paginator) HasPrevious ¶
HasPrevious returns true if there is a previous page relative to current page.
func (*Paginator) TotalPages ¶
TotalPage returns number of total pages.
Click to show internal directories.
Click to hide internal directories.