Documentation ¶
Index ¶
Constants ¶
View Source
const ( // System Code SuccessCode = 0 ServiceErrCode = 10001 ParamErrCode = 10002 // User ErrCode LoginErrCode = 11001 UserNotExistErrCode = 11002 UserAlreadyExistErrCode = 11003 )
Variables ¶
View Source
var ( Success = NewErrNo(SuccessCode, "Success") ServiceErr = NewErrNo(ServiceErrCode, "Service is unable to start successfully") ParamErr = NewErrNo(ParamErrCode, "Wrong Parameter has been given") LoginErr = NewErrNo(LoginErrCode, "Wrong username or password") UserNotExistErr = NewErrNo(UserNotExistErrCode, "User does not exists") UserAlreadyExistErr = NewErrNo(UserAlreadyExistErrCode, "User already exists") )
Functions ¶
func BuildBaseResp ¶
BuildBaseResp build baseResp from error
Types ¶
type ErrNo ¶
func (ErrNo) WithMessage ¶
Click to show internal directories.
Click to hide internal directories.