pagination

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: MIT Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Page

type Page struct {
	// contains filtered or unexported fields
}

func NewPage

func NewPage(page int, perPage int) Page

func (Page) Limit

func (p Page) Limit() int

func (Page) Offset

func (p Page) Offset() int

type PageResult

type PageResult struct {
	Page       int
	PerPage    int
	TotalPages int
	TotalItems int
}

func NewPageResult

func NewPageResult(p Page, totalItems int) PageResult

func (PageResult) HasNext

func (p PageResult) HasNext() bool

func (PageResult) HasPrevious

func (p PageResult) HasPrevious() bool

func (PageResult) Next

func (p PageResult) Next() int

func (PageResult) Overflow added in v0.13.2

func (p PageResult) Overflow() bool

func (PageResult) Previous

func (p PageResult) Previous() int

func (PageResult) Seen

func (p PageResult) Seen() int

Jump to

Keyboard shortcuts

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