Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Client Errors ErrBadRequest = iota + 400 ErrForbidden ErrNotFound ErrMethodNotAllowed ErrNotAcceptable ErrRequestTimeout ErrConflict ErrGone ErrPreconditionFailed ErrPayloadTooLarge ErrUnsupportedMediaType ErrTooManyRequests // Server Errors ErrInternalServerError = iota + 500 ErrNotImplemented ErrBadGateway ErrGatewayTimeout ErrHTTPVersionNotSupported ErrVariantAlsoNegotiates ErrInsufficientStorage ErrLoopDetected ErrNotExtended ErrNetworkAuthenticationRequired )
HTTP相关错误代码
View Source
const ( ErrDatabaseConnectionFailed = iota + 6001 ErrDatabaseQueryFailed ErrDatabaseUpdateFailed ErrDatabaseNotFound ErrDuplicateRecord ErrInsufficientDatabasePermissions ErrDatabaseTimeout ErrDatabaseTransactionFailed ErrDatabaseIntegrityConstraintViolation ErrDatabaseDiskFull )
数据库相关错误代码
View Source
const ( ErrResourceNotFound = iota + 8001 // 资源未找到 ErrResourceAlreadyExists // 资源已存在 ErrResourceInvalid // 资源无效 ErrResourceNotAuthorized // 无权限访问资源 ErrResourceNotAllowed // 资源不允许操作 ErrResourceNotImplemented // 资源未实现 ErrResourceNotSupported // 资源不被支持 ErrResourceNotAvailable // 资源不可用 ErrResourceNotAvailableInThisRegion // 该区域中资源不可用 ErrResourceNotAvailableInThisZone // 该区域中资源不可用 ErrResourceNotAvailableInThisEnvironment // 该环境中资源不可用 ErrResourceNotAvailableInThisEnvironmentType // 该环境类型中资源不可用 ErrResourceNotAvailableInThisEnvironmentVersion // 该环境版本中资源不可用 ErrResourceNotAvailableInThisEnvironmentVersionType // 该环境版本类型中资源不可用 ErrResourceNotAvailableInThisEnvironmentVersionTypeVersion // 该环境版本类型版本中资源不可用 )
定义资源操作过程中可能遇到的错误类型
View Source
const ( ErrEnvBinding = iota + 5001 ErrUnmarshal )
EnvBindingErrorCode 定义绑定环境变量失败的错误码。
View Source
const (
ErrDNSResolutionFailed = iota + 7001
)
网络相关错误代码
View Source
const ErrFileNotFound = 4001
文件不存在的err
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.