Documentation
¶
Index ¶
- func BusinessError(c *gin.Context, err error)
- func ErrorPanic(c *gin.Context, err any)
- func ForbiddenError(c *gin.Context, err error)
- func MethodNotAllowedError(c *gin.Context, err error)
- func NotFoundError(c *gin.Context, err error)
- func ServerError(c *gin.Context, err error)
- func Success(c *gin.Context, data any)
- func TooManyRequests(c *gin.Context, err error)
- func UnauthorizedError(c *gin.Context)
- func ValidationError(c *gin.Context, err error)
- type Response
- type Stackconfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Response ¶
type Response struct {
Code int `json:"code"`
Message string `json:"message"`
ErrorPath string `json:"error_path,omitempty"`
Function string `json:"error_function,omitempty"`
Data any `json:"data,omitempty"`
RequestInfo *requests.Requests `json:"request_info,omitempty"`
Extra any `json:"extra,omitempty"`
}
Response 统一响应结构
Click to show internal directories.
Click to hide internal directories.