pagination

package
v0.0.0-...-d77c644 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrderDirection

type OrderDirection int
const (
	OrderByASC  OrderDirection = 1
	OrderByDESC OrderDirection = 2
)

type OrderField

type OrderField struct {
	Key       string
	Direction OrderDirection
}

func NewOrderField

func NewOrderField(key string, d OrderDirection) *OrderField

func NewOrderFields

func NewOrderFields(orderFields ...*OrderField) []*OrderField

type OrderFields

type OrderFields []*OrderField

func (OrderFields) AddIdSortField

func (a OrderFields) AddIdSortField() OrderFields

type Pagination

type Pagination struct {
	Total    int  `json:"total"`    // Total count
	Current  uint `json:"current"`  // Current Page
	PageSize uint `json:"pageSize"` // Page Size
}

type Param

type Param struct {
	Pagination bool `form:"-"`                                     // Pagination
	OnlyCount  bool `form:"-"`                                     // Only count
	Current    uint `form:"current,default=1"`                     // Current page
	PageSize   uint `form:"pageSize,default=10" binding:"max=100"` // Page size
}

func (Param) GetCurrent

func (a Param) GetCurrent() uint

func (Param) GetPageSize

func (a Param) GetPageSize() uint

Jump to

Keyboard shortcuts

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