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

Method NewRule

policy/parser.go:613–617  ·  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

611
612// NewRule creates a new Rule instance with an ID associated with the YAML node.
613func (p *parserImpl) NewRule(node *yaml.Node) (*Rule, int64) {
614 id := p.CollectMetadata(node)
615 r := NewRule(id)
616 return r, id
617}
618
619// NewVariable creates a new Variable instance with an ID associated with the YAML node.
620func (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