Categorygithub.com/oarkflow/errors
modulepackage
0.0.6
Repository: https://github.com/oarkflow/errors.git
Documentation: pkg.go.dev

# Functions

As calls the stdlib errors.As.
Code returns the code of the root error, if available.
ErrorF returns an Error with the DefaultCode and formatted message arguments.
FromByte converts byte slice to a string without memory allocation.
Is calls the stdlib errors.Is.
Message returns the human-readable message of the error, if available.
New is a wrapper for the stdlib new function.
NewConflict returns an Error with a CONFLICT error code.
NewE returns an Error with the DefaultCode.
NewExpired returns an Error with a EXPIRED error code.
NewInternal returns an Error with a INTERNAL error code.
NewInvalid returns an Error with a INVALID error code.
NewMaximumAttempts returns an Error with a MAXIMUMATTEMPTS error code.
NewNotFound returns an Error with a NOTFOUND error code.
NewUnknown returns an Error with a UNKNOWN error code.
ToByte converts string to a byte slice without memory allocation.
ToError Returns an application error from input.
Unwrap calls the stdlib errors.UnUnwrap.
WithContext returns an Error with a INTERNAL error code.
Wrap returns an error annotating err with a stack trace at the point Wrap is called, and the supplied message.

# Constants

CONFLICT - An action cannot be performed.
EXPIRED - Subscription expired.
INTERNAL - Error within the application.
INVALID - Validation failed.
MAXIMUMATTEMPTS - More than allowed action.
NOTFOUND - Entity does not exist.
UNKNOWN - Application unknown error.

# Variables

DefaultCode is the default code returned when none is specified.
No description provided by the author
GlobalError is a general message when no error message has been found.

# Structs

Error defines a standard application error.
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author