pager

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Help

func Help(page, pageSize int, rowsSlicePtr interface{}, rowElement interface{}, session *xorm.Session) (total int64, err error)

Help xorm page helper

func ValPageAndPageSize

func ValPageAndPageSize(page, pageSize int) (int, int)

ValPageAndPageSize validate page pageSize

func ValPageOutOfRange added in v1.4.1

func ValPageOutOfRange(total int64, page, pageSize int) bool

ValPageOutOfRange validate page out of range

Types

type PageCond

type PageCond struct {
	Page     int
	PageSize int
}

PageCond page condition

type PageModel

type PageModel struct {
	Count int64       `json:"count"`
	List  interface{} `json:"list"`
}

PageModel page model

func NewPageModel

func NewPageModel(totalRecords int64, records interface{}) *PageModel

NewPageModel new page model

Jump to

Keyboard shortcuts

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