Documentation
¶
Index ¶
- Constants
- func AbortResponse(c *gin.Context, err error)
- func AbortResponseWithCode(c *gin.Context, code int, err error)
- func GetBodyData(c *gin.Context, ReqBodyKey string) []byte
- func ParseParamID(c *gin.Context, key string) uint64
- func ResBadRequestJson(c *gin.Context, err error)
- func ResErrJson(c *gin.Context, err error)
- func ResErrJsonWithCode(c *gin.Context, code int, err error)
- func ResList(c *gin.Context, list interface{}, totalCount int)
- func ResOKJson(c *gin.Context, data interface{})
- type HttpError
- type ValidError
- type ValidErrors
Constants ¶
View Source
const StatusCode = "StatusCode"
Variables ¶
This section is empty.
Functions ¶
func AbortResponse ¶
func GetBodyData ¶
Get body data from context
func ParseParamID ¶
Param returns the value of the URL param
func ResBadRequestJson ¶
Types ¶
type ValidError ¶
func (*ValidError) Error ¶
func (v *ValidError) Error() string
type ValidErrors ¶
type ValidErrors []*ValidError
func BindAndValid ¶
func BindAndValid(c *gin.Context, v interface{}) (bool, ValidErrors)
func (ValidErrors) Error ¶
func (v ValidErrors) Error() string
func (ValidErrors) Errors ¶
func (v ValidErrors) Errors() []string
Click to show internal directories.
Click to hide internal directories.