Documentation
¶
Index ¶
- type EchoQuickResp
- func (e *EchoQuickResp) Resp(ctx echo.Context, code int, resp Response) error
- func (e *EchoQuickResp) RespBadRequest(ctx echo.Context, errmsg ...string) error
- func (e *EchoQuickResp) RespData(ctx echo.Context, data interface{}, errmsg ...string) error
- func (e *EchoQuickResp) RespFail(ctx echo.Context, errmsg ...string) error
- func (e *EchoQuickResp) RespNotFound(ctx echo.Context, errmsg ...string) error
- func (e *EchoQuickResp) RespOk(ctx echo.Context, errmsg ...string) error
- type EchoResponse
- type GinQuickResp
- func (r *GinQuickResp) Resp(ctx *gin.Context, code int, resp Response)
- func (r *GinQuickResp) RespBadRequest(ctx *gin.Context, errmsg ...string)
- func (r *GinQuickResp) RespData(ctx *gin.Context, data interface{}, errmsg ...string)
- func (r *GinQuickResp) RespFail(ctx *gin.Context, errmsg ...string)
- func (r *GinQuickResp) RespNotFound(ctx *gin.Context, errmsg ...string)
- func (r *GinQuickResp) RespOk(ctx *gin.Context, errmsg ...string)
- type GinResponse
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EchoQuickResp ¶
type EchoQuickResp struct {
}
EchoQuickResp echo quick response
func (*EchoQuickResp) RespBadRequest ¶
func (e *EchoQuickResp) RespBadRequest(ctx echo.Context, errmsg ...string) error
RespBadRequest means the client param error
func (*EchoQuickResp) RespData ¶
func (e *EchoQuickResp) RespData(ctx echo.Context, data interface{}, errmsg ...string) error
RespData data response
func (*EchoQuickResp) RespFail ¶
func (e *EchoQuickResp) RespFail(ctx echo.Context, errmsg ...string) error
RespFail business fail code
func (*EchoQuickResp) RespNotFound ¶
func (e *EchoQuickResp) RespNotFound(ctx echo.Context, errmsg ...string) error
RespNotFound means resource not found
type EchoResponse ¶
type EchoResponse interface {
RespOk(ctx echo.Context, errmsg ...string) error
RespBadRequest(ctx echo.Context, errmsg ...string) error
RespNotFound(ctx echo.Context, errmsg ...string) error
RespData(ctx echo.Context, data interface{}, errmsg ...string) error
RespFail(ctx echo.Context, errmsg ...string) error
Resp(ctx echo.Context, code int, resp Response) error
}
EchoResponse Echo Response interface
type GinQuickResp ¶
type GinQuickResp struct{}
GinQuickResp gin quick response
func (*GinQuickResp) Resp ¶
func (r *GinQuickResp) Resp(ctx *gin.Context, code int, resp Response)
Resp consume resp body
func (*GinQuickResp) RespBadRequest ¶
func (r *GinQuickResp) RespBadRequest(ctx *gin.Context, errmsg ...string)
RespBadRequest means the client param error
func (*GinQuickResp) RespData ¶
func (r *GinQuickResp) RespData(ctx *gin.Context, data interface{}, errmsg ...string)
RespData data response
func (*GinQuickResp) RespFail ¶
func (r *GinQuickResp) RespFail(ctx *gin.Context, errmsg ...string)
RespFail business fail code
func (*GinQuickResp) RespNotFound ¶
func (r *GinQuickResp) RespNotFound(ctx *gin.Context, errmsg ...string)
RespNotFound means resource not found
type GinResponse ¶
type GinResponse interface {
RespOk(ctx *gin.Context, errmsg ...string)
RespBadRequest(ctx *gin.Context, errmsg ...string)
RespNotFound(ctx *gin.Context, errmsg ...string)
RespData(ctx *gin.Context, data interface{}, errmsg ...string)
Resp(ctx *gin.Context, code int, resp Response)
RespFail(ctx *gin.Context, errmsg ...string)
}
GinResponse gin response interface
Click to show internal directories.
Click to hide internal directories.