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

Method ToConfig

cel/validator.go:502–504  ·  view source on GitHub ↗

ToConfig converts the ASTValidator to an env.Validator specifying the validator name and the limit.

()

Source from the content-addressed store, hash-verified

500
501// ToConfig converts the ASTValidator to an env.Validator specifying the validator name and the limit.
502func (v regexProgramSizeLimitValidator) ToConfig() *env.Validator {
503 return env.NewValidator(v.Name()).SetConfig(map[string]any{"limit": v.limit})
504}
505
506// Validate implements the ASTValidator interface method.
507func (v bindNestingLimitValidator) Validate(e *Env, _ ValidatorConfig, a *ast.AST, iss *Issues) {

Callers

nothing calls this directly

Calls 3

NameMethod · 0.95
NewValidatorFunction · 0.92
SetConfigMethod · 0.80

Tested by

no test coverage detected