Documentation ¶
Index ¶
Constants ¶
View Source
const ( DEFAULT_PERPAGE = 15 DEFAULT_LINKCOUNT = 5 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Paginator ¶
type Paginator struct { Request *http.Request PageLinkPrev string PageLinkNext string PageLinkLast string PageLinkFirst string PerValue int64 MaxValue int64 CurrentValue int64 CurrentPage int64 MaxPage int64 OffsetFrom int64 //开始下标,用于区域分页 OffsetTo int64 //结束下标,用于区域分页 BasePath string Data interface{} Links []Link LinkCount int64 // contains filtered or unexported fields }
func NewPaginator ¶
o: need a query seter, such as o.QueryTable("user") tp: the interface to get datas params[0], count of show href link in paginatior DEFAULT:5 params[1], count of show data in per page DEFAULT 15
func NewPaginatorByFiled ¶
o: need a query seter, such as o.QueryTable("user") tp: the interface to get datas params[0], count of show href link in paginatior DEFAULT:5 params[1], count of show data in per page DEFAULT 15
Click to show internal directories.
Click to hide internal directories.