compiler

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GlobalContextKey   = "globalContext"
	HttpKey            = "http"
	ImageDataKey       = "image"
	NamespaceObjectKey = "namespaceObject"
	ObjectKey          = "object"
	OldObjectKey       = "oldObject"
	RequestKey         = "request"
	ResourceKey        = "resource"
	VariablesKey       = "variables"
)

Variables

View Source
var (
	VariablesType = types.NewObjectType("kyverno.variables")
)

Functions

func CompileAuditAnnotations

func CompileAuditAnnotations(path *field.Path, auditAnnotations []admissionregistrationv1.AuditAnnotation, env *cel.Env, result map[string]cel.Program) field.ErrorList

func CompileMatchConditions

func CompileMatchConditions(path *field.Path, matchConditions []admissionregistrationv1.MatchCondition, env *cel.Env) ([]cel.Program, field.ErrorList)

func CompileVariables

func CompileVariables(path *field.Path, variables []admissionregistrationv1.Variable, variablesProvider *variablesProvider, env *cel.Env, result map[string]cel.Program) field.ErrorList

func NewEnv

func NewEnv() (*cel.Env, error)

func NewVariablesProvider

func NewVariablesProvider(inner types.Provider) *variablesProvider

Types

type Exception

type Exception struct {
	Exception       *policiesv1alpha1.PolicyException
	MatchConditions []cel.Program
}

type Validation

type Validation struct {
	Message           string
	MessageExpression cel.Program
	Program           cel.Program
}

func CompileValidation

func CompileValidation(path *field.Path, rule admissionregistrationv1.Validation, env *cel.Env) (Validation, field.ErrorList)

Jump to

Keyboard shortcuts

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