Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Pagination ¶
type Pagination struct { HasPrev bool `json:"has_prev"` HasNext bool `json:"has_next"` Pages int `json:"pages"` PrevPage int `json:"prev_page"` NextPage int `json:"next_page"` Items interface{} `json:"items"` Page int `json:"page"` PerPage int `json:"per_page"` Total int64 `json:"total"` }
Pagination 分页结果
func NewPagination ¶
func NewPagination(page, perPage int, total int64, items interface{}) *Pagination
NewPagination 创建分页数据
type Paginator ¶
type Paginator interface {
Paginate(page, perPage int) (*Pagination, error)
}
Paginator 分页器
Click to show internal directories.
Click to hide internal directories.