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

Method parseMatches

policy/parser.go:838–846  ·  view source on GitHub ↗
(ctx ParserContext, policy *Policy, r *Rule, node *yaml.Node)

Source from the content-addressed store, hash-verified

836}
837
838func (p *parserImpl) parseMatches(ctx ParserContext, policy *Policy, r *Rule, node *yaml.Node) {
839 id := ctx.CollectMetadata(node)
840 if p.assertYAMLType(id, node, yamlList) == nil {
841 return
842 }
843 for _, val := range node.Content {
844 r.AddMatch(p.ParseMatch(ctx, policy, val))
845 }
846}
847
848// ParseMatch will parse the current yaml node as though it is the entry point to a match.
849func (p *parserImpl) ParseMatch(ctx ParserContext, policy *Policy, node *yaml.Node) *Match {

Callers 1

ParseRuleMethod · 0.95

Calls 4

assertYAMLTypeMethod · 0.95
ParseMatchMethod · 0.95
AddMatchMethod · 0.80
CollectMetadataMethod · 0.65

Tested by

no test coverage detected