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 ¶
func (c *CELMatcher) Eval(ctx context.Context, r *authorizationv1.SubjectAccessReview) (bool, error)
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 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
Click to show internal directories.
Click to hide internal directories.