pagination

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2021 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPerPage = 20

DefaultPerPage ...

View Source
var MaxPerPage = 100

MaxPerPage ...

Functions

func Apply

func Apply(c echo.Context, scope *gorm.DB, model interface{}, list interface{}, perPage int) error

Apply apply pagination to a provided scope

Types

type Pagination added in v0.0.3

type Pagination struct {
	Count   int `json:"item_count"`
	Max     int `json:"max"`
	Page    int `json:"page"`
	PerPage int
	Offset  int
	Url     url.URL
}
var Data Pagination

Data pagination data for jsonapi

func (p *Pagination) Links() map[string]string

Jump to

Keyboard shortcuts

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