Documentation ¶
Index ¶
- type Config
- type Page
- type PageURL
- type Paginator
- func (p *Paginator) Current() int
- func (p *Paginator) CurrentURL() string
- func (p *Paginator) FristURL() int
- func (p *Paginator) HasNext() bool
- func (p *Paginator) HasPrevious() bool
- func (p *Paginator) IsFirst() bool
- func (p *Paginator) IsLast() bool
- func (p *Paginator) LastURL() int
- func (p *Paginator) Next() int
- func (p *Paginator) NextURL() int
- func (p *Paginator) PageSize() int
- func (p *Paginator) PageTemp() template.HTML
- func (p *Paginator) PageURLs() []*PageURL
- func (p *Paginator) Pages() []*Page
- func (p *Paginator) Previous() int
- func (p *Paginator) PreviousURL() int
- func (p *Paginator) Request(r *http.Request) *Paginator
- func (p *Paginator) Total() int
- func (p *Paginator) TotalPages() int
- type PaginatorRecords
- type Param
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { PageSize int Current int LinkedCount int PageKey string Request *http.Request }
Config
type PageURL ¶
type PageURL struct { *Page // contains filtered or unexported fields }
PageURL The current page's data content
type Paginator ¶
type Paginator struct {
// contains filtered or unexported fields
}
Paginator
func (*Paginator) PageTemp ¶
PageTemp Gets a page template for pagination results that can be loaded directly in html
func (*Paginator) PageURLs ¶
PageURLs returns the page number and URL information of the current page.
type PaginatorRecords ¶
type PaginatorRecords struct { TotalRecord int `json:"total_record"` TotalPage int `json:"total_page"` Records interface{} `json:"records"` Offset int `json:"offset"` Limit int `json:"limit"` Page int `json:"page"` PrevPage int `json:"prev_page"` NextPage int `json:"next_page"` }
func Paging ¶
func Paging(p *Param, result interface{}) *PaginatorRecords
Click to show internal directories.
Click to hide internal directories.