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

Method NewRule

policy/parser.go:655–659  ·  view source on GitHub ↗

NewRule creates a new Rule instance with an ID associated with the YAML node.

(node *yaml.Node)

Source from the content-addressed store, hash-verified

653
654// NewRule creates a new Rule instance with an ID associated with the YAML node.
655func (p *parserImpl) NewRule(node *yaml.Node) (*Rule, int64) {
656 id := p.CollectMetadata(node)
657 r := NewRule(id)
658 return r, id
659}
660
661// NewVariable creates a new Variable instance with an ID associated with the YAML node.
662func (p *parserImpl) NewVariable(node *yaml.Node) (*Variable, int64) {

Callers

nothing calls this directly

Calls 2

CollectMetadataMethod · 0.95
NewRuleFunction · 0.85

Tested by

no test coverage detected