Documentation ¶
Overview ¶
Package paginater is a helper module for custom pagination calculation.
Index ¶
- type Page
- type Paginater
- func (p *Paginater) Current() int
- func (p *Paginater) HasNext() bool
- func (p *Paginater) HasPrevious() bool
- func (p *Paginater) IsFirst() bool
- func (p *Paginater) IsLast() bool
- func (p *Paginater) Next() int
- func (p *Paginater) Pages() []*Page
- func (p *Paginater) PagingNum() int
- func (p *Paginater) Previous() int
- func (p *Paginater) Total() int
- func (p *Paginater) TotalPages() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Page ¶
type Page struct {
// contains filtered or unexported fields
}
Page presents a page in the paginater.
type Paginater ¶
type Paginater struct {
// contains filtered or unexported fields
}
Paginater represents a set of results of pagination calculations.
func (*Paginater) HasPrevious ¶
HasPrevious returns true if there is a previous page relative to current page.
func (*Paginater) Pages ¶
Pages returns a list of nearby page numbers relative to current page. If value is -1 means "..." that more pages are not showing.
func (*Paginater) TotalPages ¶
TotalPage returns number of total pages.
Click to show internal directories.
Click to hide internal directories.