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

Interface ASTValidator

cel/validator.go:126–139  ·  view source on GitHub ↗

ASTValidator defines a singleton interface for validating a type-checked Ast against an environment. Note: the Issues argument is mutable in the sense that it is intended to collect errors which will be reported to the caller.

Source from the content-addressed store, hash-verified

124// Note: the Issues argument is mutable in the sense that it is intended to collect errors which will be
125// reported to the caller.
126type ASTValidator interface {
127 // Name returns the name of the validator. Names must be unique.
128 Name() string
129
130 // Validate validates a given Ast within an Environment and collects a set of potential issues.
131 //
132 // The ValidatorConfig is generated from the set of ASTValidatorConfigurer instances prior to
133 // the invocation of the Validate call. The expectation is that the validator configuration
134 // is created in sequence and immutable once provided to the Validate call.
135 //
136 // See individual validators for more information on their configuration keys and configuration
137 // properties.
138 Validate(*Env, ValidatorConfig, *ast.AST, *Issues)
139}
140
141// ConfigurableASTValidator supports conversion of an object to an `env.Validator` instance used for
142// YAML serialization.

Callers 16

TestParseFunction · 0.65
registerVariableMethod · 0.65
CompileRuleFunction · 0.65
compileRuleMethod · 0.65
programFunction · 0.65
newStandardInterpreterFunction · 0.65
addFunctionBindingsFunction · 0.65
planCreateStructMethod · 0.65
CheckMethod · 0.65
FromConfigFunction · 0.65
CompileOptionsMethod · 0.65
TestValidateRejectionsFunction · 0.65

Implementers 10

stringFormatValidatorV2ext/formatting_v2.go
stringFormatValidatorext/formatting.go
formatValidatorcel/validator.go
nestingLimitValidatorcel/validator.go
returnTypeValidatorcel/env_test.go

Calls

no outgoing calls

Tested by

no test coverage detected