Documentation
¶
Index ¶
Constants ¶
View Source
const ( SuccessCode = 0 ServiceErrCode = 10001 ParamErrCode = 10002 AuthorizationFailedErrCode = 10003 UserAlreadyExistErrCode = 10004 UserNotExistErrCode = 10005 TypeNotSupportErrCode = 10006 VideoNotFoundErrCode = 10007 )
新增错误后也需要添加到ErrorMap
Variables ¶
View Source
var ( Success = NewErrNo(SuccessCode, "Successfully") ServiceErr = NewErrNo(ServiceErrCode, "Service is unable to start successfully") ParamErr = NewErrNo(ParamErrCode, "Wrong Parameter has been given") AuthorizationFailedErr = NewErrNo(AuthorizationFailedErrCode, "Authorization failed") )
View Source
var ErrorMap = map[int32]struct{}{10001: {}, 10002: {}, 10003: {}, 10004: {}, 10005: {}, 10006: {}, 10007: {}}
Functions ¶
This section is empty.
Types ¶
type ErrEn ¶
func (ErrEn) WithMessage ¶
Click to show internal directories.
Click to hide internal directories.