matchconditions

package
v0.29.9 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 16 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MatchCondition

type MatchCondition v1.MatchCondition

MatchCondition contains the inputs needed to compile, evaluate and match a cel expression

func (*MatchCondition) GetExpression

func (v *MatchCondition) GetExpression() string

func (*MatchCondition) ReturnTypes

func (v *MatchCondition) ReturnTypes() []*cel.Type

type MatchResult

type MatchResult struct {
	Matches             bool
	Error               error
	FailedConditionName string
}

type Matcher

type Matcher interface {
	// Match is used to take cel evaluations and convert into decisions
	Match(ctx context.Context, versionedAttr *admission.VersionedAttributes, versionedParams runtime.Object, authz authorizer.Authorizer) MatchResult
}

Matcher contains logic for converting Evaluations to bool of matches or does not match

func NewMatcher

func NewMatcher(filter celplugin.Filter, failPolicy *v1.FailurePolicyType, matcherKind, matcherType, objectName string) Matcher

Jump to

Keyboard shortcuts

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