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

Method NewPolicy

policy/parser.go:648–652  ·  view source on GitHub ↗

NewPolicy creates a new Policy instance with an ID associated with the YAML node.

(node *yaml.Node)

Source from the content-addressed store, hash-verified

646
647// NewPolicy creates a new Policy instance with an ID associated with the YAML node.
648func (p *parserImpl) NewPolicy(node *yaml.Node) (*Policy, int64) {
649 policy := NewPolicy(p.src, p.info)
650 id := p.CollectMetadata(node)
651 return policy, id
652}
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) {

Callers

nothing calls this directly

Calls 2

CollectMetadataMethod · 0.95
NewPolicyFunction · 0.85

Tested by

no test coverage detected