Documentation ¶
Index ¶
- Constants
- func BadGateway(ctx *gin.Context)
- func BadGatewayWithJSON(ctx *gin.Context, data any)
- func BadRequest(ctx *gin.Context)
- func BadRequestWithJSON(ctx *gin.Context, data any)
- func InternalError(ctx *gin.Context)
- func InternalErrorWithJSON(ctx *gin.Context, data any)
- func JSON(ctx *gin.Context, statusCode int, reply any)
- func OK(ctx *gin.Context)
- func OKWithJSON(ctx *gin.Context, reply any)
- func Timeout(ctx *gin.Context)
- func TimeoutWithJSON(ctx *gin.Context, data any)
- type Response
Constants ¶
View Source
const ( StatusOK = 0 StatusBad = 100 + iota StatusBadRequest StatusInternalServerError Proxy = 200 + iota ProxyNotAllowed ProxyNotFound ProxyBadRequest // 请求参数错误 ProxyInternalServerError // 函数内存错误,通常为非超时造成的错误 ProxyTimeout // 超时错误 )
View Source
const (
ErrBadRequestParams = "解析请求数据失败"
)
Variables ¶
This section is empty.
Functions ¶
func BadGateway ¶
func BadGatewayWithJSON ¶
func BadRequest ¶
func BadRequestWithJSON ¶
func InternalError ¶
func InternalErrorWithJSON ¶
func OKWithJSON ¶
func TimeoutWithJSON ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.