Documentation ¶
Index ¶
- Constants
- func Cause(err error) error
- func Errorf(format string, args ...interface{}) error
- func Errs(errs []error) error
- func New(msg string) error
- func Trace() string
- func Trace2() string
- func Wrapf(err error, format string, args ...interface{}) error
- type ErrOption
- type Error
- type ErrorSpec
- type Priority
- type Severity
Constants ¶
View Source
const ( OptionType = iota OptionStatusCode OptionPriority OptionSeverity OptionNotifyTo OptionOutput OptionHTTPResponse TypeOK = "OK" TypeInternalError = "InternalError" TypeConfigurationError = "ConfigurationError" TypeSecurity = "Security" TypeInvalidData = "InvalidData" TypeNetworkUnreachable = "NetworkUnreachable" PriorityLow Priority = "LOW" PriorityMedium Priority = "MEDIUM" PriorityHigh Priority = "HIGH" PriorityUrgent Priority = "URGENT" SeverityTrace Severity = "TRACE" SeverityDebug Severity = "DEBUG" SeverityInfo Severity = "INFO" SeverityWarning Severity = "WARNING" SeverityError Severity = "ERROR" SeverityCritical Severity = "CRITICAL" SeverityFatal Severity = "FATAL" SeverityPanic Severity = "PANIC" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ErrOption ¶
type ErrOption struct { Key int Value interface{} }
func SetHTTPResponse ¶
func SetHTTPResponse(w http.ResponseWriter) ErrOption
type Error ¶
type ErrorSpec ¶
type ErrorSpec struct { Message string `json:"message,omitempty"` Trace string `json:"trace,omitempty"` Type string `json:"type,omitempty"` // security | invalidData | networkUnreachable StatusCode int `json:"statusCode,omitempty"` Priority Priority `json:"priority,omitempty"` Severity Severity `json:"severity,omitempty"` }
Click to show internal directories.
Click to hide internal directories.