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

Method NewPolicy

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

604
605// NewPolicy creates a new Policy instance with an ID associated with the YAML node.
606func (p *parserImpl) NewPolicy(node *yaml.Node) (*Policy, int64) {
607 policy := NewPolicy(p.src, p.info)
608 id := p.CollectMetadata(node)
609 return policy, id
610}
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) {

Callers

nothing calls this directly

Calls 2

CollectMetadataMethod · 0.95
NewPolicyFunction · 0.85

Tested by

no test coverage detected