MCPcopy Index your code
hub / github.com/chainloop-dev/chainloop / policyReferenceResourceDescriptor

Function policyReferenceResourceDescriptor

pkg/policies/loader.go:349–356  ·  view source on GitHub ↗
(policyName, ref, orgName string, digest crv1.Hash)

Source from the content-addressed store, hash-verified

347}
348
349func policyReferenceResourceDescriptor(policyName, ref, orgName string, digest crv1.Hash) *PolicyDescriptor {
350 return &PolicyDescriptor{
351 URI: ref,
352 Name: policyName,
353 Digest: digest.String(),
354 OrgName: orgName,
355 }
356}
357
358func ExtractDigest(ref string) (string, string) {
359 parts := strings.SplitN(ref, "@", 2)

Callers 4

LoadMethod · 0.85
unmarshallResourceFunction · 0.85
LoadMethod · 0.85

Calls 1

StringMethod · 0.65

Tested by 1