Documentation
¶
Index ¶
- func MatchAll(matches []Matcher) (bool, error)
- type FieldQuery
- func Always[T comparable]() FieldQuery[T]
- func Any[T comparable](match T) FieldQuery[T]
- func Exact[T comparable](match T) FieldQuery[T]
- func Like[T comparable](match T) FieldQuery[T]
- func NewQuery[T comparable, O optional.Optional[T]](matchType MatchType, value O) FieldQuery[T]
- func None[T comparable](match T) FieldQuery[T]
- type Match
- type MatchType
- type Matcher
- type Query
- type StringQuery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FieldQuery ¶
type FieldQuery[T comparable] struct { // contains filtered or unexported fields }
func Always ¶
func Always[T comparable]() FieldQuery[T]
func Any ¶
func Any[T comparable](match T) FieldQuery[T]
func Exact ¶
func Exact[T comparable](match T) FieldQuery[T]
func Like ¶
func Like[T comparable](match T) FieldQuery[T]
func NewQuery ¶
func NewQuery[T comparable, O optional.Optional[T]](matchType MatchType, value O) FieldQuery[T]
func None ¶
func None[T comparable](match T) FieldQuery[T]
func (FieldQuery[T]) AsRef ¶
func (q FieldQuery[T]) AsRef() *FieldQuery[T]
func (*FieldQuery[T]) Matches ¶
func (q *FieldQuery[T]) Matches(value T) (bool, error)
func (*FieldQuery[T]) MatchesOption ¶
func (q *FieldQuery[T]) MatchesOption(value optional.Optional[T]) (bool, error)
type Match ¶
type Match[T comparable] struct { // contains filtered or unexported fields }
type MatchType ¶
type MatchType int
const ( // Matching operations defined. These are currently implemented for individual values, but could be extended to slices // of values as noted: MatchAlways MatchType = iota // This ALWAYS matches. It is true if S = S ∪ S which is always true. MatchNone // True if ⦰ = S MatchAny // True if ⦰ != S MatchSome // True if ⦰ != S1 ∩ S2. TODO: implement this! Until we support slices in queries this is the same as Exact though... MatchExact // True if ⦰ = S1 𝚫 S2 MatchLike // Only valid for strings: perform )
type Matcher ¶
func NewValueMatch ¶
func NewValueMatch[T comparable](operand T, query Query[T]) Matcher
type StringQuery ¶
type StringQuery struct {
// contains filtered or unexported fields
}
func AlwaysString ¶
func AlwaysString() StringQuery
func AnyString ¶
func AnyString(match string) StringQuery
func ExactString ¶
func ExactString(match string) StringQuery
func LikeString ¶
func LikeString(match string) StringQuery
func NewStringQuery ¶
func NewStringQuery(matchType MatchType, value optional.Optional[string]) StringQuery
func NoneString ¶
func NoneString(match string) StringQuery
func (StringQuery) AsRef ¶
func (q StringQuery) AsRef() *StringQuery
func (*StringQuery) MatchesOption ¶
Click to show internal directories.
Click to hide internal directories.