Documentation ¶
Index ¶
- Constants
- func Custom(ctx *gin.Context, data gin.H)
- func Error(ctx *gin.Context, code int, err error, msg string)
- func OK(ctx *gin.Context, data interface{}, msg string)
- func PageOK(ctx *gin.Context, result interface{}, count int, pageIndex int, pageSize int, ...)
- type Page
- type PageResponse
- type Response
Constants ¶
View Source
const CreatedSuccess = "创建成功!"
View Source
const DeletedFail = "删除失败!"
View Source
const DeletedSuccess = "删除成功!"
View Source
const GetSuccess = "查询成功!"
View Source
const NotFound = "未找到相关内容或者数据为空!"
View Source
const TimeOut = "操作超时!"
View Source
const UpdatedSuccess = "更新成功!"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PageResponse ¶
type PageResponse struct { // 状态码 Code int `json:"code" example:"200"` // 消息 Msg string `json:"msg"` // 数据集 Data Page `json:"data"` }
func (*PageResponse) ReturnOK ¶
func (res *PageResponse) ReturnOK() *PageResponse
Click to show internal directories.
Click to hide internal directories.