pagination

package
v0.0.0-...-15b0c83 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MaxPage

func MaxPage(pageSize, totalRows int) int

func PageOffset

func PageOffset(page, pageSize int) int

Types

type FullPager

type FullPager struct {
	// 页码
	CurrentPage int `json:"current_page"`
	// 每页数量
	PageSize int `json:"page_size"`
	// 总行数
	TotalRows int `json:"total_rows"`
	// 总页数
	TotalPages int `json:"total_pages"`
}

func NewFullPager

func NewFullPager(page, pageSize, totalRows int) FullPager

type Pager

type Pager struct {
	// 页码
	CurrentPage int `json:"current_page"`
	// 每页数量
	PageSize int `json:"page_size"`
}

func NewPager

func NewPager(currentPage int, pageSize int) *Pager

Jump to

Keyboard shortcuts

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