Documentation
¶
Index ¶
- Constants
- func BadGateway(c *gin.Context)
- func Error(c *gin.Context, code int, err string)
- func ErrorWithAppError(c *gin.Context, fallbackStatus int, err error)
- func ErrorWithCodeAndParams(c *gin.Context, status int, code string, message string, params map[string]any)
- func ErrorWithKey(c *gin.Context, code int, err string, messageKey string, ...)
- func InternalError(c *gin.Context)
- func InvalidJSON(c *gin.Context)
- func InvalidParam(c *gin.Context)
- func Success(c *gin.Context, data any)
- type ResponseStruct
Constants ¶
View Source
const ( ErrBadRequest = "Invalid request parameters" ErrInvalidJSON = "Invalid JSON format" ErrInvalidParam = "Invalid parameter" ErrValidation = "Input validation failed" ErrDuplicateResource = "Resource already exists" ErrResourceNotFound = "Resource not found" ErrInternalServer = "An unexpected error occurred" ErrDatabase = "Database operation failed" ErrTooManyRequests = "Too many requests" )
Variables ¶
This section is empty.
Functions ¶
func BadGateway ¶
func ErrorWithCodeAndParams ¶
func ErrorWithKey ¶
func InternalError ¶
func InvalidJSON ¶
func InvalidParam ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.