paginator

package
v1.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultPerPage = 10
	MaxPerPage     = 500
)

...

Variables

This section is empty.

Functions

This section is empty.

Types

type Paginate

type Paginate struct {
	Paginate struct {
		Page int `json:"Page"` //查询第几页
		Per  int `json:"Per"`  //每页数量
	} `json:"Paginate"`
	DisableLimit bool `json:"DisableLimit"` //是否关闭限制
}

Paginate 分页

func NoLimit

func NoLimit(page int, per int) Paginate

NoLimit ...

func Paginator

func Paginator(page int, per int) Paginate

Paginator ...

func (Paginate) GetPage

func (p Paginate) GetPage() int

GetPage ...

func (Paginate) GetPer

func (p Paginate) GetPer() int

GetPer ...

func (Paginate) OffSet

func (p Paginate) OffSet() int

OffSet ...

func (Paginate) SetPage

func (p Paginate) SetPage(page int)

SetPage ...

Jump to

Keyboard shortcuts

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