package
0.1.9
Repository: https://github.com/quocdaitrn/golang-kit.git
Documentation: pkg.go.dev

# Functions

AddError2HTTPErrorMapping add a mapping internal code to http.errors.HTTPError.
AddErrorHTTPErrorMapping add a mapping internal Error and http.errors.HTTPError.
Error2HTTPError converts a input error to errors.HTTPError.
HTTPError2KitError converts an errors.HTTPError to kit Error.
NewHTTPError creates, initializes and returns a new HTTPError instance.

# Variables

HTTPErrAuthorizationHeaderMissing is an error which occurres when missing 'Authorization' header in the request.
HTTPErrBadGateway is common error bad gateway.
HTTPErrBadRequest is a common bad request error.
HTTPErrBearerTokenInvalid is an error which occurres when the token isn't a Bearer token.
HTTPErrDuplicateKey is error for inserting a document to database with a duplicate id or values which are marked as unique index.
HTTPErrForbidden is a common error forbidden.
HTTPErrGatewayTimeout is common error service unavailable.
HTTPErrInsufficientPermission is an error which occurres when a request does not have permission to access a API.
HTTPErrInternalServerError is common internal error in server.
HTTPErrValidationFormFailed is an error when failed to validate request.
HTTPErrMultipleTokenProvied is an error which occurres when there are more than one token in the request.
HTTPErrNotFound is a common error not found.
HTTPErrNotImplemented is common error not implemented.
HTTPErrRepoIgnoreOp is error when a op is ignored because a previous op is error.
HTTPErrRequestBindingFailed is an error when failed to bind http request.
HTTPErrResourceNotFound is error for querying the database for a document which does not exist.
HTTPErrRetrieveTokenFailed is an authorization when server failed to get Bearer token from the value of header 'Authorization'.
HTTPErrServiceUnavailable is common error service unavailable.
HTTPErrTokenBlacklisted is an error which occurres when the token is blacklisted.
HTTPErrUnauthorized is a common authorization error.
HTTPErrUnrecognizableToken is an error which occurres when the token unable to recognizable.

# Structs

HTTPError defines a HTTP error that can be returned in a Response from the spec.