Documentation ¶
Index ¶
- Constants
- func APIException(c *gin.Context, code int, msg string, data any)
- func APIFailure(c *gin.Context, msg string, data any)
- func APISuccess(c *gin.Context, data any, count int)
- func APISuccessBytes(c *gin.Context, data []byte, count int)
- func APISuccessBytesData(data []byte, count int) []byte
- func APISuccessNil(c *gin.Context)
- func TxtException(c *gin.Context, code int, msg string)
- func TxtMsg(c *gin.Context, msg string)
- type APIData
Constants ¶
View Source
const MIMEApplicationJSONCharsetUTF8 = "application/json; charset=utf-8"
Variables ¶
This section is empty.
Functions ¶
func APIException ¶
APIException 通用异常处理
func APISuccessBytes ¶
APISuccessBytes 返回成功, JSON 字节数据, 状态码: 200
func APISuccessBytesData ¶
APISuccessBytesData API 请求成功返回值(JSON Bytes)
Types ¶
Click to show internal directories.
Click to hide internal directories.