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

Function NewPolicy

policy/parser.go:38–46  ·  view source on GitHub ↗

NewPolicy creates a policy object which references a policy source and source information.

(src *Source, info *ast.SourceInfo)

Source from the content-addressed store, hash-verified

36
37// NewPolicy creates a policy object which references a policy source and source information.
38func NewPolicy(src *Source, info *ast.SourceInfo) *Policy {
39 return &Policy{
40 metadata: map[string]any{},
41 source: src,
42 info: info,
43 semantic: unspecified,
44 imports: []*Import{},
45 }
46}
47
48// Policy declares a name, rule, and evaluation semantic for a given expression graph.
49type Policy struct {

Callers 2

NewPolicyMethod · 0.85

Calls

no outgoing calls

Tested by 1