criteria

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2024 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type And

type And struct {
	Operands []Criteria
}

func (And) IsSatisfiedBy

func (a And) IsSatisfiedBy(value any) bool

type Attr

type Attr struct {
	Name       string
	Value      any
	Comparison Comparator
}

func (Attr) IsSatisfiedBy

func (a Attr) IsSatisfiedBy(obj any) bool

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 Criteria

type Criteria interface {
	IsSatisfiedBy(any) bool
}

type Not

type Not struct {
	Operand Criteria
}

func (Not) IsSatisfiedBy

func (n Not) IsSatisfiedBy(value any) bool

type Or

type Or struct {
	Operands []Criteria
}

func (Or) IsSatisfiedBy

func (o Or) IsSatisfiedBy(value any) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL