pagination

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pager

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

Pager defines all the parameters needed to list records properly

func NewPager

func NewPager(
	page uint32,
	size uint32,
) (*Pager, error)

NewPager creates an instance of Pager

func (*Pager) IsZero

func (p *Pager) IsZero() bool

IsZero defines whether Pager is empty

func (*Pager) Page

func (p *Pager) Page() uint32

Page returns the number of the page

func (*Pager) Size

func (p *Pager) Size() uint32

Size returns the amount of records of the page

func (*Pager) String

func (p *Pager) String() string

String defines the string interface

Jump to

Keyboard shortcuts

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