pagepagination

package
v0.0.353 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: Apache-2.0 Imports: 5 Imported by: 2

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 PagePaginator

type PagePaginator struct {
	MaxItems     int
	DefaultItems int
}

func (*PagePaginator) ParsePagination

func (p *PagePaginator) 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