Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultPagingSize = 100
View Source
const FirstPage = 1
View Source
const MaxPagingSize = 2000
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Page ¶
type Pagination ¶
type Pagination struct {
Paging *Paging `bson:"paging" json:"paging"`
Items []any `bson:"items" json:"items"`
}
func PagingWrap ¶
func PagingWrap[T any](paging *Paging, arr []*T, wrap func(m *T) any) Pagination
type Paging ¶
type Paging struct {
Size int64 `json:"page_size"` // Page Size, default 100
Current int64 `json:"page_no"` // From One
Total int64 `json:"page_total"` // The Page Count
ItemTotal int64 `json:"item_total"` // The Item Count
}
func PagingOfPage ¶
func (*Paging) WithItemTotal ¶
Click to show internal directories.
Click to hide internal directories.