package
Version:
v0.1.6
Opens a new window with list of versions in this module.
Published: Apr 14, 2025
License: BSD-3-Clause
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Data[T any] struct {
Total int64 `json:"total"`
List []T `json:"list"`
}
Data 分页数据响应体
T 列表每一项的数据类型
type DataMeta[T any, M any] struct {
Data[T]
Meta M `json:"meta"`
}
DataMeta 分页数据响应体(携带额外数据)
T 列表每一项的数据类型
M 非列表数据的数据类型
type Query struct {
PageNum int `json:"pageNum" form:"pageNum"`
PageSize int `json:"pageSize" form:"pageSize"`
}
Query 分页请求的基类
func NewQuery(pageNum, pageSize int) Query
Source Files
¶
Click to show internal directories.
Click to hide internal directories.