Documentation ¶
Index ¶
- func ErrorAs[E error](err error) (e E)
- type BadValueError
- func BadValue(badValueType BadValueType, name string, value interface{}) *BadValueError
- func InvalidValue(name string, value interface{}, expected interface{}) *BadValueError
- func MalformedValue(name string, value interface{}) *BadValueError
- func ValueExpired(name string, expiredAt time.Time) *BadValueError
- type BadValueType
- type BatchError
- type ConfigurationError
- type ConflictError
- type DependencyError
- type Gomerr
- type InternalError
- type MarshalError
- type NotFoundError
- type PanicError
- type UnmarshalError
- type UnprocessableError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BadValueError ¶
type BadValueError struct { Gomerr Type BadValueType Name string Value interface{} }
func BadValue ¶
func BadValue(badValueType BadValueType, name string, value interface{}) *BadValueError
func InvalidValue ¶
func InvalidValue(name string, value interface{}, expected interface{}) *BadValueError
func MalformedValue ¶
func MalformedValue(name string, value interface{}) *BadValueError
func ValueExpired ¶
func ValueExpired(name string, expiredAt time.Time) *BadValueError
func (*BadValueError) WithReason ¶
func (bve *BadValueError) WithReason(reason string) *BadValueError
type BadValueType ¶
type BadValueType string
const ( ExpiredValueType BadValueType = "Expired" GenericBadValueType BadValueType = "BadValue" InvalidValueType BadValueType = "Invalid" MalformedValueType BadValueType = "Malformed" )
type BatchError ¶
type BatchError struct { Gomerr // contains filtered or unexported fields }
func (*BatchError) Errors ¶
func (b *BatchError) Errors() []Gomerr
func (*BatchError) ToMap ¶
func (b *BatchError) ToMap() map[string]interface{}
type ConfigurationError ¶
func Configuration ¶
func Configuration(problem string) *ConfigurationError
type ConflictError ¶
func Conflict ¶
func Conflict(with interface{}, problem string) *ConflictError
func (*ConflictError) WithSource ¶
func (c *ConflictError) WithSource(source interface{}) *ConflictError
type DependencyError ¶
func Dependency ¶
func Dependency(service string, request interface{}) *DependencyError
type Gomerr ¶
type Gomerr interface { error Unwrap() error Is(err error) bool Wrap(err error) Gomerr AddAttribute(key string, value interface{}) Gomerr ReplaceAttribute(key string, value interface{}) Gomerr DeleteAttribute(key string) Gomerr AddAttributes(keysAndValues ...interface{}) Gomerr WithAttributes(attributes map[string]interface{}) Gomerr Attribute(key string) (value interface{}) AttributeLookup(key string) (value interface{}, ok bool) Attributes() map[string]interface{} String() string ToMap() map[string]interface{} // contains filtered or unexported methods }
type InternalError ¶
func Internal ¶
func Internal(issue string) *InternalError
type MarshalError ¶
func Marshal ¶
func Marshal(what string, value interface{}) *MarshalError
type NotFoundError ¶
func NotFound ¶
func NotFound(type_ string, id string) *NotFoundError
type PanicError ¶
type PanicError struct { Gomerr Recover interface{} }
func Panic ¶
func Panic(recover interface{}) *PanicError
type UnmarshalError ¶
type UnmarshalError struct { Gomerr What string Data interface{} `gomerr:"include_type"` Target interface{} `gomerr:"include_type"` }
func Unmarshal ¶
func Unmarshal(what string, data, target interface{}) *UnmarshalError
type UnprocessableError ¶
func Unprocessable ¶
func Unprocessable(reason string, value interface{}) *UnprocessableError
Click to show internal directories.
Click to hide internal directories.