Documentation
¶
Overview ¶
Package errmapper is a service that resolves a given error or error chain to a new single error.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MatchType ¶
type MatchType int
MatchType represents the type of matching operation to be performed on a given error chain. Can be either 'MatchAll' or 'MatchAny'.
type Rule ¶
type Rule struct {
// Targets is a list of errors to match against.
Targets []error
// MatchType is the type of matching operation to be performed on a given error chain.
// Can be either MatchAll or MatchAny.
MatchType MatchType
// ResultFn is a function to build the result error.
ResultFn func(err error) error
}
Rule holds information about a rule to be applied to a given error or error chain.
Click to show internal directories.
Click to hide internal directories.