paginations

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultMaxPageSize

func GetDefaultMaxPageSize() int

func SetDefaultMaxPageSize

func SetDefaultMaxPageSize(maxSize int)

Types

type Pagination

type Pagination[T any] struct {
	PageSize     int `json:"page_size"`
	PageNo       int `json:"page_no"`
	SearchOption T   `json:"search_option"` // 查询条件
}

func (*Pagination[T]) Limit

func (p *Pagination[T]) Limit() int

func (*Pagination[T]) Offset

func (p *Pagination[T]) Offset() int

Jump to

Keyboard shortcuts

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