package
1.0.18
Repository: https://github.com/alkaid/goerrors.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

BadRequest new BadRequest error that is mapped to a 400 response.
ClientClosed new ClientClosed error that is mapped to a HTTP 499 response.
Clone deep clone error to a new error.
Code returns the http code for an error.
Conflict new Conflict error that is mapped to a 409 response.
Forbidden new Forbidden error that is mapped to a 403 response.
FromError try to convert an error to *Error.
FromStatus 将 IStatus 转为 Error 并 Error.WithStack @param status @return error.
FromStatusWithoutStack 将 IStatus 转为 Error, 不带 stack @param status @return *Error.
GatewayTimeout new GatewayTimeout error that is mapped to a HTTP 504 response.
InternalServer new InternalServer error that is mapped to a 500 response.
IsBadRequest determines if err is an error which indicates a BadRequest error.
IsClientClosed determines if err is an error which indicates a IsClientClosed error.
IsConflict determines if err is an error which indicates a Conflict error.
IsForbidden determines if err is an error which indicates a Forbidden error.
IsGatewayTimeout determines if err is an error which indicates a GatewayTimeout error.
IsInternalServer determines if err is an error which indicates an Internal error.
IsNotFound determines if err is an error which indicates an NotFound error.
IsServiceUnavailable determines if err is an error which indicates a Unavailable error.
IsUnauthorized determines if err is an error which indicates a Unauthorized error.
New returns an error object for the code, message.
NotFound new NotFound error that is mapped to a 404 response.
Reason returns the reason for a particular error.
Register 注册错误信息.
ServiceUnavailable new ServiceUnavailable error that is mapped to a HTTP 503 response.
Unauthorized new Unauthorized error that is mapped to a 401 response.

# Constants

SupportPackageIsVersion1 this constant should not be referenced by any other code.
UnknownCode is unknown code for error info.
UnknownReason is unknown reason for error info.

# Variables

No description provided by the author
optional int32 code = 1109;.
optional int32 default_code = 1108;.
optional string message = 1111;.
optional string pretty = 1110;.
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

Error is a status error.
服务状态.

# Interfaces

No description provided by the author