page

package
v0.0.0-...-6a802dc Latest Latest
Warning

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

Go to latest
Published: May 18, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Page

type Page struct {
	Page    int    `form:"page" binding:"min=1"`
	PerPage int    `form:"perPage" binding:"min=5,max=100"`
	Filter  string `form:"filter"`
	// contains filtered or unexported fields
}

func New

func New(ctx *gin.Context) *Page

func (*Page) Like

func (self *Page) Like() string
func (self *Page) Links(total int) *PageLinks

func (*Page) Pages

func (self *Page) Pages(total int) int

func (*Page) Skip

func (self *Page) Skip() int
type PageLinks struct {
	First *string `json:"first"`
	Last  *string `json:"last"`
	Next  *string `json:"next"`
	Prev  *string `json:"prev"`
}
func NewLinks(p *Page, total int) *PageLinks

Jump to

Keyboard shortcuts

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