pagination

package module
v0.0.0-...-45c5aae Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2019 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 int         `json:"count"`
	TotalPage   int         `json:"total_page"`
	Records     interface{} `json:"data"`
	Offset      int         `json:"-"`
	Limit       int         `json:"per_page"`
	Page        int         `json:"page"`
	PrevPage    int         `json:"-"`
	NextPage    int         `json:"-"`
}

Paginator 分页返回

func Paging

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

Paging 分页

type Param

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

Param 分页参数

Jump to

Keyboard shortcuts

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