Documentation ¶
Index ¶
- Constants
- type Meta
- type Paginator
- func (p *Paginator) LimitParam() *restful.Parameter
- func (p *Paginator) NextUrl(req *restful.Request) string
- func (p *Paginator) Parse(req *restful.Request) (skip, limit int)
- func (p *Paginator) ParseLimit(req *restful.Request) int
- func (p *Paginator) ParseSkip(req *restful.Request) int
- func (p *Paginator) PreviousUrl(req *restful.Request) string
- func (p *Paginator) SkipParam() *restful.Parameter
- func (p *Paginator) Urls(req *restful.Request, skip, limit, count int) (previous, next string)
Constants ¶
View Source
const ( DefaultLimitName = "limit" DefaultSkipName = "skip" DefaultLimitDefault = 20 DefaultLimitMax = 100 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Paginator ¶
type Paginator struct { LimitName string SkipName string LimitDefault int LimitMax int Host string // if there is no host, then url for previous and next will be relative }
func (*Paginator) LimitParam ¶
func (p *Paginator) LimitParam() *restful.Parameter
func (*Paginator) ParseLimit ¶
parse request and return limit
func (*Paginator) PreviousUrl ¶
Click to show internal directories.
Click to hide internal directories.