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

# Functions

AddBusinessError add a error code in to list of business errors.
Cause returns the underlying cause of the error, if possible.
Error2KitError converts a input error to errors.Error.
Errorf formats according to a format specifier and returns the string as a value that satisfies error.
IsBusinessError reports if input error is a business error.
New returns an error with the supplied message.
NewError creates and returns a instance of Error.
NewErrorWithUserMessage creates and returns a instance of Error with user message.
WithStack annotates err with a stack trace at the point WithStack was called.

# 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
No description provided by the author
No description provided by the author
No description provided by the author
Common errors in services.
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
List error in the Repository [0, 100).
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
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
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

# Variables

ErrAuthorizationHeaderMissing is an error which occurres when missing 'Authorization' header in the request.
ErrBadGateway is a common error bad gateway.
ErrBadRequest represents a bad request.
ErrBearerTokenInvalid is an error which occurres when the token isn't a Bearer token.
ErrClientError represents a common client error.
ErrCloudEventsInvalidUnmarshalError is error when bind http request fail.
ErrForbidden is a common forbidden error.
ErrHTTPUnsupportedMediaType is error when bind http request fail.
ErrInsufficientPermission is an error which occurres when a request does not have permission to access a action.
ErrInternalServerError is error for common error in server.
ErrInvalidRequest is error when request form is invalid in endpoint.
ErrMultipleTokenProvied is an error which occurres when there are more than one token in the request.
ErrNotFound is a common error not found.
ErrNotImplemented is a common error not implemented.
ErrRepo represents for any undefined error which occur in the repositories.
ErrRepoCacheInvalid is error when getting an invalid item from cache.
ErrRepoCacheKeyEmpty is error when setting or getting from cache by an empty key.
ErrRepoCacheNotFound is error when finding a item that is not existed in cache.
ErrRepoDuplicateKey occurs when trying to insert an entity to repository with an existed id.
ErrRepoEntityIDUnspecified is error for inserting an entity to repository with an id empty.
ErrRepoEntityNotFound occurs when finding an entity that not exists in repository.
ErrRepoIgnoreOp is error when a op is ignored because a previous op is error.
ErrRepoInputValueMustBeArrayOrSlice occurs when a input value is not an array or slice while it must be.
ErrRepoInputValueMustNonEmpty occurs when a input value is an empty slice or array while it must not.
ErrRepoInputValueMustNotNil occurs when a input value is nil while it must not.
ErrRepoUnsupportedOperator occurs when an operator of a query expression is unsupported by a specific repo.
ErrRequestBindingFailed is error when bind http request fail.
ErrRequestScopesInvalid is error when a request make without a valid scopes.
ErrRequestSourceBlacklisted is error when a request made without a empty source.
ErrRequestSourceEmpty is error when a request made with a empty source.
ErrRequestTimeout is a common error gateway timeout.
ErrServiceUnavailable is a common error service unavailable.
ErrTokenBlacklisted is an error which occurres when the token is blacklisted.
ErrUnauthorized is a common authorization error.
ErrUnrecognizableToken is an error which occurres when the token unable to recognizable.
ErrValidatorJSONSchemaNotFound is a common error valodator JSON schema not found.

# Structs

Error represents an error in kit.