Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildDefPageLink ¶
BuildPageLink build a string 'Link' that like as : "Link: /api/v1beta1/namespace/default/users?pageSelector=page=1,perPage=1; rel=prev, "/api/v1beta1/users?pageSelector=page=3,perPage=1; rel= next," "/api/v1beta1/users?pageSelector=page=5,perPage=1; rel=last"
Types ¶
type Selector ¶
type Selector interface { //present page.default first page must be 1 PresentPage() (has bool, page, perPage uint64) //previous page PreviousPage() (has bool, page, perPage uint64) //previous page NextPage() (has bool, page, perPage uint64) //previous page LastPage() (has bool, page, perPage uint64) //set count with all of itmes SetItemTotal(itemsSum uint64) // Empty returns true if this pagination does not restrict the pagination space. Empty() bool // String returns a human readable string that represents this pager. String() string // RequirePage returns RequirePage, RequirePerPage RequirePage() (uint64, uint64) //determine condition for this request,return:hasPage, perpageCount, skipcount Condition(itemsSum uint64) (bool, uint64, uint64) }
func ParsePaginaton ¶
func SelectorFromSet ¶
Click to show internal directories.
Click to hide internal directories.