package
0.0.0-20240831112900-7acfb5e2f1d9
Repository: https://github.com/ml444/gkit.git
Documentation: pkg.go.dev

# Functions

BadRequest new BadRequest error that is mapped to a 400 response.
ClientClosed new ClientClosed error that is mapped to an HTTP 499 response.
Clone deep clone error to a new error.
Conflict new Conflict error that is mapped to a 409 response.
CreateError returns an error object for the status code, error code, message.
No description provided by the author
ErrCode returns the reason for a particular error.
No description provided by the author
ErrorIs returns true if err is an *Error and its ErrorCode matches errCode.
Forbidden new Forbidden error that is mapped to a 403 response.
FromError try to convert an error to *Error.
FromGRPCCode converts a gRPC error code into the corresponding HTTP response status.
GatewayTimeout new GatewayTimeout error that is mapped to an 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 an Unavailable error.
IsUnauthorized determines if err is an error which indicates an Unauthorized error.
No description provided by the author
NewWithMsg new error from errcode and message.
NewWithStatus new error from errcode and message.
NotFound new NotFound error that is mapped to a 404 response.
No description provided by the author
ServiceUnavailable new ServiceUnavailable error that is mapped to an HTTP 503 response.
No description provided by the author
StatusCode returns the http code for an error.
ToGRPCCode converts an HTTP error code into the corresponding gRPC response status.
Unauthorized new Unauthorized error that is mapped to a 401 response.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
StatusClientClosed is non-standard http status code, which defined by nginx.
No description provided by the author

# Variables

DefaultConverter default converter.
No description provided by the author

# Structs

No description provided by the author
Error is a status error.
No description provided by the author

# Interfaces

Converter is a status converter.