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

Method parseMatches

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

Source from the content-addressed store, hash-verified

888}
889
890func (p *parserImpl) parseMatches(ctx ParserContext, policy *Policy, r *Rule, node *yaml.Node) {
891 id := ctx.CollectMetadata(node)
892 if p.assertYAMLType(id, node, yamlList) == nil {
893 return
894 }
895 for _, val := range node.Content {
896 r.AddMatch(p.parseMatchInternal(ctx, policy, r, val))
897 }
898}
899
900// ParseMatch will parse the current yaml node as though it is the entry point to a match.
901func (p *parserImpl) ParseMatch(ctx ParserContext, policy *Policy, node *yaml.Node) *Match {

Callers 1

ParseRuleMethod · 0.95

Calls 4

assertYAMLTypeMethod · 0.95
parseMatchInternalMethod · 0.95
AddMatchMethod · 0.80
CollectMetadataMethod · 0.65

Tested by

no test coverage detected