Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Success = NewErrNo(int64(errno.Err_Success), "Success") BadRequest = NewErrNo(int64(errno.Err_BadRequest), "Request Failed") GenerateTokenFail = NewErrNo(int64(errno.Err_GenerateTokenFail), "Generate token failed") RequestServerFail = NewErrNo(int64(errno.Err_RequestServerFail), "Request server failed") BindAndValidateFail = NewErrNo(int64(errno.Err_BindAndValidateFail), "Bind and validate failed") ParamErr = NewErrNo(int64(errno.Err_ParamErr), "Param error") AuthorizeFail = NewErrNo(int64(errno.Err_AuthorizeFail), "Authorize failed") )
Functions ¶
func SendResponse ¶
func SendResponse(c *app.RequestContext, err ErrNo, data interface{})
SendResponse pack response.
Types ¶
type ErrNo ¶
func (ErrNo) WithMessage ¶
Click to show internal directories.
Click to hide internal directories.