Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoResolverFound = fmt.Errorf("no resolver found")
ErrNoResolverFound is the error returned when no resolver is found for a given criteria
Functions ¶
This section is empty.
Types ¶
type Attr ¶
type Attr struct {
Name string
Value any
Comparison Comparator
}
func (Attr) IsSatisfiedBy ¶
type Comparator ¶
type Comparator string
const ( ComparisonEq Comparator = "eq" ComparisonNe Comparator = "ne" ComparisonGt Comparator = "gt" ComparisonGte Comparator = "gte" ComparisonLt Comparator = "lt" ComparisonLte Comparator = "lte" )
type Converter ¶ added in v0.0.2
Converter is a helper to convert a Criteria to a different implementation with a set of resolvers
type Criteria ¶
type Criteria interface {
// IsSatisfiedBy returns true if the value satisfies the condition.
IsSatisfiedBy(any) bool
}
Criteria is the interface that wraps the basic method to check if a value satisfies a condition.
type CriteriaPrimitive ¶ added in v0.0.2
CriteriaPrimitive is a helper interface to allow the conversion of a Criteria to a primitive Criteria. Useful to work with custom criteria types.
Click to show internal directories.
Click to hide internal directories.