pagination

package
v0.0.0-...-4cd3371 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Paginate

func Paginate(totalRows int64, pagination *Pagination, db *gorm.DB) func(db *gorm.DB) *gorm.DB

Types

type Pagination

type Pagination struct {
	Limit      int    `json:"limit,omitempty;query:limit"`
	Page       int    `json:"page,omitempty;query:page"`
	TotalRows  int64  `json:"total_rows"`
	TotalPages int    `json:"total_pages"`
	Q          string `json:"q,omitempty;query:q"`
}

func (*Pagination) GetLimit

func (p *Pagination) GetLimit() int

func (*Pagination) GetOffset

func (p *Pagination) GetOffset() int

func (*Pagination) GetPage

func (p *Pagination) GetPage() int

func (*Pagination) ToString

func (p *Pagination) ToString() string

Jump to

Keyboard shortcuts

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