Documentation
¶
Index ¶
- func Http400(ctx *gin.Context, message string)
- func Http401(ctx *gin.Context)
- func Http403(ctx *gin.Context)
- func Http404(ctx *gin.Context)
- func Http429(ctx *gin.Context)
- func Http500(ctx *gin.Context, err error)
- func ValidationError(ctx *gin.Context, errors interface{})
- type ErrorDetail
- type JSONResponse
- type JSONResponseError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidationError ¶
ValidationError generates a 400 Bad Request response with validation failed details
Types ¶
type ErrorDetail ¶
type ErrorDetail struct {
Message string `json:"message,omitempty"`
RequestError interface{} `json:"requestError,omitempty"`
}
type JSONResponse ¶
type JSONResponse struct {
Success bool `json:"success"`
Data interface{} `json:"data,omitempty"`
}
type JSONResponseError ¶
type JSONResponseError struct {
Success bool `json:"success"`
Error ErrorDetail `json:"error"`
}
Click to show internal directories.
Click to hide internal directories.