cel

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CELMatcher

type CELMatcher struct {
	CompilationResults []CompilationResult
}

func (*CELMatcher) Eval

eval evaluates the given SubjectAccessReview against all cel matchCondition expression

type CompilationResult

type CompilationResult struct {
	Program            cel.Program
	ExpressionAccessor ExpressionAccessor
}

CompilationResult represents a compiled authorization cel expression.

type Compiler

type Compiler interface {
	CompileCELExpression(expressionAccessor ExpressionAccessor) (CompilationResult, error)
}

Compiler is an interface for compiling CEL expressions with the desired environment mode.

func NewCompiler

func NewCompiler(env *environment.EnvSet) Compiler

NewCompiler returns a new Compiler.

type EvaluationResult

type EvaluationResult struct {
	EvalResult         ref.Val
	ExpressionAccessor ExpressionAccessor
}

EvaluationResult contains the minimal required fields and metadata of a cel evaluation

type ExpressionAccessor

type ExpressionAccessor interface {
	GetExpression() string
	ReturnTypes() []*celgo.Type
}

type SubjectAccessReviewMatchCondition

type SubjectAccessReviewMatchCondition struct {
	Expression string
}

SubjectAccessReviewMatchCondition is a CEL expression that maps a SubjectAccessReview request to a list of values.

func (*SubjectAccessReviewMatchCondition) GetExpression

func (v *SubjectAccessReviewMatchCondition) GetExpression() string

func (*SubjectAccessReviewMatchCondition) ReturnTypes

func (v *SubjectAccessReviewMatchCondition) ReturnTypes() []*celgo.Type

Jump to

Keyboard shortcuts

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