MCPcopy Create free account
hub / github.com/cel-expr/cel-go / Compiler

Interface Compiler

tools/compiler/compiler.go:93–100  ·  view source on GitHub ↗

Compiler interface is used to set up a compiler with the following capabilities: - create a CEL environment - create a policy parser - fetch policy compiler options - fetch policy environment options Note: This compiler is not the same as the CEL expression compiler, rather it provides an abstracti

Source from the content-addressed store, hash-verified

91// abstraction layer which can create the different components needed for parsing and compiling CEL
92// expressions and policies.
93type Compiler interface {
94 // CreateEnv creates a singleton CEL environment with the configured environment options.
95 CreateEnv() (*cel.Env, error)
96 // CreatePolicyParser creates a policy parser using the optionally configured parser options.
97 CreatePolicyParser() (*policy.Parser, error)
98 // PolicyCompilerOptions returns the policy compiler options.
99 PolicyCompilerOptions() []policy.CompilerOption
100}
101
102// CustomMetadataCompiler interface is used to set up a compiler with the following capabilities:
103// - fetch policy metadata environment options

Callers 10

ProgramsMethod · 0.65
createTestInputFromPBMethod · 0.65
evalMethod · 0.65
createTestInputMethod · 0.65
createResultMatcherMethod · 0.65
CreateASTMethod · 0.65
CreateASTMethod · 0.65
CreateASTMethod · 0.65
CreateASTMethod · 0.65

Implementers 1

compilertools/compiler/compiler.go

Calls

no outgoing calls

Tested by

no test coverage detected