pagination

package
v0.0.0-...-9b2df44 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultPageSize = 10
	MaxPageSize     = 100
)

Functions

This section is empty.

Types

type Paginator

type Paginator struct {
	Page       int `json:"page,omitempty"`
	PerPage    int `json:"per_page,omitempty"`
	TotalPages int `json:"total_pages,omitempty"`
	TotalItems int `json:"total_items,omitempty"`
}

func NewPaginator

func NewPaginator(page, perPage, totalItems int) *Paginator

func (*Paginator) Limit

func (p *Paginator) Limit() int

func (*Paginator) Offset

func (p *Paginator) Offset() int

Jump to

Keyboard shortcuts

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