paginator

package
v2.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPageSize = 10

DefaultPageSize 默认页大小

Functions

This section is empty.

Types

type Info

type Info struct {
	PageIndex int   `json:"pageIndex,omitempty"`
	PageSize  int   `json:"pageSize,omitempty"`
	Total     int64 `json:"total"`
}

Info 分页一些信息

type Param

type Param struct {
	PageIndex int `form:"pageIndex" json:"pageIndex"`
	PageSize  int `form:"pageSize" json:"pageSize"`
}

Param 分页查询参数

func DefaultParam

func DefaultParam() Param

DefaultParam 默认分页参数值

func (*Param) Inspect

func (sf *Param) Inspect(pageSize ...int) *Param

Inspect 校验分页查询参数有效性,非法值将设置为默认值, 默认分页索引: 第1页 默认分页大小: DefaultPageSize 可修改DefaultPageSize改变全局默认分页大小或传入参数

Jump to

Keyboard shortcuts

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