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: 0

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