pager

package module
Version: v0.1.6 Latest Latest
Warning

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

Go to latest
Published: May 18, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

README

pager

Documentation

Index

Constants

View Source
const (
	DefaultPageSize = 20
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Pager

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

func New

func New(count, page, pageSize int32) (r *Pager)

func (*Pager) CurrentPage added in v0.1.3

func (this *Pager) CurrentPage() (r int32)

func (*Pager) ItemCount

func (this *Pager) ItemCount() (r int32)

func (*Pager) Offset

func (this *Pager) Offset() (r int32)

func (*Pager) PageCount

func (this *Pager) PageCount() (r int32)

func (*Pager) PageSize

func (this *Pager) PageSize() (r int32)

func (*Pager) Render added in v0.1.1

func (this *Pager) Render() (r *RenderData)

type RenderData added in v0.1.1

type RenderData struct {
	CurrentPage int32 `json:"current_page"`
	PageSize    int32 `json:"page_size"`
	ItemCount   int32 `json:"item_count"`
	PageCount   int32 `json:"page_count"`
}

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL