pagination

package
v1.0.19 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Param

type Param struct {
	OnlyCount bool `form:"-"`                                     // 是否仅查询count
	UsedPage  bool `form:"-"`                                     // 是否使用分页查询
	PageIndex int  `form:"pageIndex,default=1"`                   // 当前页
	PageSize  int  `form:"pageSize,default=10" binding:"max=100"` // 页大小
}

Param 分页查询条件

func (Param) GetCurrent

func (a Param) GetCurrent() int

GetCurrent 获取当前页

func (Param) GetOffset

func (a Param) GetOffset() int

GetOffset 获取偏置大小

func (Param) GetPageSize

func (a Param) GetPageSize() int

GetPageSize 获取页大小

type Result

type Result struct {
	Count     int64       `json:"count"`
	List      interface{} `json:"list"`
	PageIndex int         `json:"pageIndex"`
	PageSize  int         `json:"pageSize"`
}

Result 分页查询结果

Jump to

Keyboard shortcuts

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