condition

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2021 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MatchStrings

func MatchStrings(ctx context.Context, str string, mode MatchMode, matches ...string) (bool, error)

Types

type Condition

type Condition interface {
	Check(ctx context.Context) (bool, error)
	ContainsUniqueRequest() bool
}

func GetAlwaysTrueCondition

func GetAlwaysTrueCondition() Condition

func Interface2Condition

func Interface2Condition(i interface{}, task RelatedTask) (Condition, error)

type LogicalOperator

type LogicalOperator string

LogicalOperator represents a logical operator (OR or AND).

type MatchMode

type MatchMode string

MatchMode represents a match mode that is used to match a condition.

func (*MatchMode) Validate

func (m *MatchMode) Validate() error

type RelatedTask

type RelatedTask byte
const (
	ClassifyDevice RelatedTask = iota + 1
	PropertyVendor
	PropertyModel
	PropertyModelSeries
	PropertyDefault
)

Jump to

Keyboard shortcuts

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