Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCodes = make(map[int]*errCode) /* General Errors */ OK = newErrCode(200, "OK", "成功") NotSupported = newErrCode(300, "Not Supported", "系统不支持") NotFound = newErrCode(400, "Not Found", "数据不存在") NotImplemented = newErrCode(600, "Not Implemented", "逻辑未实现") Unexpected = newErrCode(999, "Unexpected Error", "未知错误") /* Resource Errors: 100,000 - 100,999 */ ResourceNotFound = newErrCode(100404, "Resource Not Found", "资源不存在") ResourceAccessFailure = newErrCode(100501, "Resource Access Failure", "资源访问失败") ResourceUpdateFailure = newErrCode(100502, "Resource Update Failure", "资源修改失败") ResourceDeleteFailure = newErrCode(100503, "Resource Delete Failure", "资源删除失败") /* Control Errors: 200,000 - 200,999 */ InvalidStatusTransition = newErrCode(200501, "Invalid Status Transition", "非法的状态切换") )
Functions ¶
func IsNotFound ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.