Documentation
¶
Index ¶
- func IsCode(err error, code Code) bool
- type AppError
- func Conflict(message string, cause error) *AppError
- func Dependency(message string, cause error) *AppError
- func Forbidden(message string, cause error) *AppError
- func Internal(message string, cause error) *AppError
- func InvalidInput(message string, cause error) *AppError
- func New(code Code, message string) *AppError
- func NotFound(message string, cause error) *AppError
- func Timeout(message string, cause error) *AppError
- func Unauthorized(message string, cause error) *AppError
- func Unavailable(message string, cause error) *AppError
- func Validation(message string, cause error) *AppError
- func Wrap(err error, code Code, message string) *AppError
- type Code
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppError ¶
type AppError struct {
Code Code `json:"code"`
Message string `json:"message"`
Cause error `json:"-"`
Fields map[string]interface{} `json:"fields,omitempty"`
}
AppError is the unified error type used across the repository
func Dependency ¶
func InvalidInput ¶
func Unauthorized ¶
func Unavailable ¶
func Validation ¶
Click to show internal directories.
Click to hide internal directories.