Documentation
¶
Index ¶
- Constants
- func GetBodyData(c *gin.Context) []byte
- func GetToken(c *gin.Context) string
- func ParseForm(c *gin.Context, obj interface{}) error
- func ParseJSON(c *gin.Context, obj interface{}) error
- func ParseParamID(c *gin.Context, key string) uint64
- func ParseQuery(c *gin.Context, obj interface{}) error
- func ResError(c *gin.Context, err error, status ...int)
- func ResJSON(c *gin.Context, status int, v interface{})
- func ResList(c *gin.Context, v interface{})
- func ResOK(c *gin.Context)
- func ResPage(c *gin.Context, v interface{}, pr *schema.PaginationResult)
- func ResSuccess(c *gin.Context, v interface{})
Constants ¶
View Source
const ( ReqBodyKey = prefix + "/req-body" ResBodyKey = prefix + "/res-body" )
Variables ¶
This section is empty.
Functions ¶
func GetBodyData ¶ added in v8.1.0
Get body data from context
func ParseParamID ¶
Param returns the value of the URL param
func ParseQuery ¶
Parse query parameter to struct
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.