Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pagination ¶
Pagination 结构体表示分页参数
func (*Pagination) CalculateOffset ¶
func (p *Pagination) CalculateOffset() int
CalculateOffset 根据分页参数计算偏移量
type Response ¶
type Response struct { Code int `json:"code"` Message string `json:"message"` Data interface{} `json:"data"` }
Response 结构体表示通用的响应格式
func NewErrorResponse ¶
NewErrorResponse 返回一个错误的响应
func NewSuccessResponse ¶
func NewSuccessResponse(data interface{}) *Response
NewSuccessResponse 返回一个成功的响应
Click to show internal directories.
Click to hide internal directories.