pagination

package
v0.0.0-...-ac5fab8 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPaginatorLimit = 10

Variables

This section is empty.

Functions

func SetUserDefineLimit

func SetUserDefineLimit(limit int64)

Types

type AbstractPaginator

type AbstractPaginator interface {
	GetLimit() int64
	GetTotal() int64
	GetOffset() int64
	GetCurrentPage() int64
}

type Paginator

type Paginator struct {
	Page   int64 `query:"page" json:"page"`
	Last   int64 `query:"-" json:"last"`
	Total  int64 `query:"-" json:"total"`
	Limit  int64 `query:"limit" json:"limit"`
	Offset int64 `query:"-" json:"-"`
}

func Init

func Init() *Paginator

func (*Paginator) GetCurrentPage

func (receiver *Paginator) GetCurrentPage() int64

func (*Paginator) GetLimit

func (receiver *Paginator) GetLimit() int64

func (*Paginator) GetOffset

func (receiver *Paginator) GetOffset() int64

func (*Paginator) GetTotal

func (receiver *Paginator) GetTotal() int64

Jump to

Keyboard shortcuts

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