page

package
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2020 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParsePageParam

func ParsePageParam(r *restful.Request) (page int, size int)

ParsePageParam parses page and size from http request.

Types

type Pagination

type Pagination struct {
	Page       int         `json:"page"`
	PageSize   int         `json:"pageSize"`
	Total      int         `json:"total"`
	TotalPages int         `json:"totalPages"`
	Items      interface{} `json:"items"`
}

Pagination contains data for ping items

func Pagein

func Pagein(page int, size int, total int) (start int, end int, pagin Pagination)

Pagein returns start and end index by given param.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL