Documentation
¶
Index ¶
- func HandleBadRequest(ctx *gin.Context, message string)
- func HandleError(ctx *gin.Context, statusCode int, errorCode int, message string, ...)
- func HandleErrorWithStatus(ctx *gin.Context, statusCode int, message string)
- func HandleForbidden(ctx *gin.Context, message string)
- func HandleInternalError(ctx *gin.Context, message string)
- func HandleNotFound(ctx *gin.Context, message string)
- func HandleSuccess(ctx *gin.Context, data interface{})
- func HandleUnauthorized(ctx *gin.Context, message string)
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleBadRequest ¶
HandleBadRequest sends a 400 Bad Request response
func HandleError ¶
HandleError sends an error response
func HandleErrorWithStatus ¶
HandleErrorWithStatus sends an error response with custom status and message
func HandleForbidden ¶
HandleForbidden sends a 403 Forbidden response
func HandleInternalError ¶
HandleInternalError sends a 500 Internal Server Error response
func HandleNotFound ¶
HandleNotFound sends a 404 Not Found response
func HandleSuccess ¶
HandleSuccess sends a successful response
func HandleUnauthorized ¶
HandleUnauthorized sends a 401 Unauthorized response
Types ¶
Click to show internal directories.
Click to hide internal directories.