condition

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: MIT Imports: 0 Imported by: 1

Documentation

Index

Constants

View Source
const (
	GroupLogicAnd = iota
	GroupLogicOr
	GroupLogicXor
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	Negation() Builder
	GroupLogic(l GroupLogic) Builder
	GroupChildren(children []Condition) Builder
	MatchAttrKey(k string) Builder
	MatchAttrValuePattern(p string) Builder
	MatchAttrValuePartial() Builder

	BuildGroupCondition() (c Condition)
	BuildKiwiTreeCondition() (c Condition)
}

func NewBuilder

func NewBuilder() Builder

type Condition

type Condition interface {
	IsNot() bool
}

func NewCondition

func NewCondition(not bool) Condition

type GroupCondition

type GroupCondition interface {
	Condition
	GetLogic() (logic GroupLogic)
	GetGroup() (group []Condition)
}

func NewGroupCondition

func NewGroupCondition(c Condition, logic GroupLogic, group []Condition) GroupCondition

type GroupLogic

type GroupLogic int

func (GroupLogic) String

func (gl GroupLogic) String() string

type KeyCondition

type KeyCondition interface {
	Condition
	GetKey() string
}

func NewKeyCondition

func NewKeyCondition(c Condition, k string) KeyCondition

type KiwiCondition

type KiwiCondition interface {
	KeyCondition
	IsPartial() bool
	GetPattern() string
}

func NewKiwiCondition

func NewKiwiCondition(kc KeyCondition, partial bool, pattern string) KiwiCondition

type KiwiTreeCondition

type KiwiTreeCondition interface {
	KiwiCondition
}

KiwiTreeCondition is a marker type representing that the pattern is/to be stored in the kiwi-tree storage.

func NewKiwiTreeCondition

func NewKiwiTreeCondition(kc KiwiCondition) KiwiTreeCondition

Jump to

Keyboard shortcuts

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