MCPcopy Create free account
hub / github.com/conforma/cli / NewGenerator

Function NewGenerator

internal/validate/vsa/vsa.go:136–143  ·  view source on GitHub ↗

NewGenerator creates a new VSA predicate generator

(report applicationsnapshot.Report, comp applicationsnapshot.Component, policySource string, policy PublicKeyProvider)

Source from the content-addressed store, hash-verified

134
135// NewGenerator creates a new VSA predicate generator
136func NewGenerator(report applicationsnapshot.Report, comp applicationsnapshot.Component, policySource string, policy PublicKeyProvider) *Generator {
137 return &Generator{
138 Report: report,
139 Component: comp,
140 PolicySource: policySource,
141 Policy: policy,
142 }
143}
144
145// normalizeIndexRef normalizes an image reference to its pinned digest form if it's an index
146func normalizeIndexRef(ref string, exp *applicationsnapshot.ExpansionInfo) string {

Callers 6

ProcessComponentVSAMethod · 0.85
TestGeneratePredicateFunction · 0.85
TestNewGeneratorFunction · 0.85

Calls

no outgoing calls

Tested by 4

TestGeneratePredicateFunction · 0.68
TestNewGeneratorFunction · 0.68