tokenpagination

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PaginationHeader

func PaginationHeader(w http.ResponseWriter, u *url.URL, total int64, page, itemsPerPage int)

Types

type TokenPaginator

type TokenPaginator struct {
	MaxItems     int
	DefaultItems int
}

func (*TokenPaginator) ParsePagination

func (p *TokenPaginator) ParsePagination(r *http.Request) (page, itemsPerPage int)

ParsePagination parses limit and page from *http.Request with given limits and defaults.

Jump to

Keyboard shortcuts

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