page

package
v0.2.37 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PAGE      = 1
	PAGE_SIZE = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Paging

type Paging struct {
	Page     int `json:"page"`
	PageSize int `json:"pageSize"`
}

func NewPaging

func NewPaging(page int) Paging

func NewPaging2

func NewPaging2(page int, pageSize int) Paging

func (Paging) GetOffset

func (p Paging) GetOffset() int

type PagingResult

type PagingResult struct {
	Count     int64       `json:"count"`
	Current   int         `json:"current"`
	PageSize  int         `json:"pageSize"`
	Results   interface{} `json:"results"`
	TotalPage int64       `json:"totalPage"`
}

func NewPagingResult

func NewPagingResult(paging *Paging, count int64) *PagingResult

func NewPagingResult2

func NewPagingResult2(paging Paging) *PagingResult

func (*PagingResult) GetTotalPage

func (pr *PagingResult) GetTotalPage() int64

func (*PagingResult) SetTotalPage

func (pr *PagingResult) SetTotalPage()

Jump to

Keyboard shortcuts

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