Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BadValueError ¶
type BadValueError struct {
Gomerr
Type BadValueType
Name string
Value any
}
func BadValue ¶
func BadValue(badValueType BadValueType, name string, value any) *BadValueError
func InvalidValue ¶
func InvalidValue(name string, value any, expected any) *BadValueError
func MalformedValue ¶
func MalformedValue(name string, value any) *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]any
type ConfigurationError ¶
func Configuration ¶
func Configuration(problem string) *ConfigurationError
type ConflictError ¶
func Conflict ¶
func Conflict(with, id, problem string) *ConflictError
func (*ConflictError) WithSource ¶
func (c *ConflictError) WithSource(source any) *ConflictError
type DependencyError ¶
func Dependency ¶
func Dependency(service string, request any) *DependencyError
type Gomerr ¶
type Gomerr interface {
error
Unwrap() error
Is(err error) bool
Wrap(err error) Gomerr
AddAttribute(key string, value any) Gomerr
ReplaceAttribute(key string, value any) Gomerr
DeleteAttribute(key string) Gomerr
AddAttributes(keysAndValues ...any) Gomerr
WithAttributes(attributes map[string]any) Gomerr
Attribute(key string) (value any)
AttributeLookup(key string) (value any, ok bool)
Attributes() map[string]any
String() string
ToMap() map[string]any
// contains filtered or unexported methods
}
var NotAnError Gomerr = ¬AnError{}
NotAnError is a sentinel value that looks like a Gomerr but represents "no error." Use errors.Is(err, NotAnError) to detect it explicitly.
type InternalError ¶
func Internal ¶
func Internal(issue string) *InternalError
type MarshalError ¶
func Marshal ¶
func Marshal(what string, value any) *MarshalError
type NotFoundError ¶
func NotFound ¶
func NotFound(type_ string, id string) *NotFoundError
type PanicError ¶
func Panic ¶
func Panic(recover any) *PanicError
type UnmarshalError ¶
func Unmarshal ¶
func Unmarshal(what string, data, target any) *UnmarshalError
type UnprocessableError ¶
func Unprocessable ¶
func Unprocessable(reason string, value any) *UnprocessableError
Click to show internal directories.
Click to hide internal directories.