pagination

package module
v0.0.0-...-a93fec6 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Paginator

type Paginator struct {
	TotalRecord int64       `json:"total_record"`
	TotalPage   int64       `json:"total_page"`
	Records     interface{} `json:"records"`
	Offset      int64       `json:"offset"`
	Limit       int64       `json:"limit"`
	Page        int64       `json:"page"`
	FirstPage   int64       `json:"first_page"`
	LastPage    int64       `json:"last_page"`
	PrevPage    int64       `json:"prev_page"`
	NextPage    int64       `json:"next_page"`
	Error       error       `json:"-"`
}

Paginator 分页返回

func Paging

func Paging(p *Param, result interface{}) *Paginator

Paging 分页

type Param

type Param struct {
	DB      *gorm.DB
	Page    int64
	Limit   int64
	OrderBy []string
	ShowSQL bool
}

Param 分页参数

Jump to

Keyboard shortcuts

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