pagination

package
v0.12.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PaginationRequest

type PaginationRequest struct {
	Page     uint64
	PageSize uint64
}

func NewRequest

func NewRequest(page, pageSize int32) PaginationRequest

func Start added in v0.12.0

func Start(pageSize ...int32) *PaginationRequest

Start creates a new PaginationRequest that starts at the first page. You can provide an optional pageSize argument. If none is provided, 15 is used. All arguments apart from the first one are ignored.

func (*PaginationRequest) Advance added in v0.12.0

func (pr *PaginationRequest) Advance() *PaginationRequest

Advance returns a new pagination request with the page incremented by 1

func (*PaginationRequest) ApplyToSelect

func (*PaginationRequest) CalculatePages

func (pr *PaginationRequest) CalculatePages(count int) int32

func (*PaginationRequest) Offset

func (pr *PaginationRequest) Offset() uint64

Jump to

Keyboard shortcuts

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