xpage

package
v0.0.0-...-2beabf4 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: MIT Imports: 0 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalcOffset

func CalcOffset(page, perPage int) int

CalcOffset cal offset

Types

type Pagination

type Pagination struct {
	HasPrev  bool        `json:"has_prev"`
	HasNext  bool        `json:"has_next"`
	Pages    int         `json:"pages"`
	PrevPage int         `json:"prev_page"`
	NextPage int         `json:"next_page"`
	Items    interface{} `json:"items"`
	Page     int         `json:"page"`
	PerPage  int         `json:"per_page"`
	Total    int64       `json:"total"`
}

Pagination 分页结果

func NewPagination

func NewPagination(page, perPage int, total int64, items interface{}) *Pagination

NewPagination 创建分页数据

type Paginator

type Paginator interface {
	Paginate(page, perPage int) (*Pagination, error)
}

Paginator 分页器

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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