Documentation
¶
Index ¶
- Variables
- func Custum(c *gin.Context, data gin.H)
- func Error(c *gin.Context, code int, err error, msg string)
- func GenerateMsgIDFromContext(c *gin.Context) string
- func OK(c *gin.Context, data interface{}, msg string)
- func PageOK(c *gin.Context, result interface{}, count int, pageIndex int, pageSize int, ...)
- type Page
- type Response
- type Responses
Constants ¶
This section is empty.
Variables ¶
View Source
var Default = &response{}
Default default response
Functions ¶
func GenerateMsgIDFromContext ¶
GenerateMsgIDFromContext 生成msgID
Types ¶
type Page ¶
type Page struct {
Count int `json:"count"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
}
Page server api page
type Response ¶
type Response struct {
// 数据集
RequestId string `protobuf:"bytes,1,opt,name=requestId,proto3" json:"requestId,omitempty"`
Code int32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"`
Msg string `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"`
}
Response server response
Source Files
¶
- model.go
- response.go
- type.go
- util.go
Click to show internal directories.
Click to hide internal directories.