MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / applyGroupGate

Function applyGroupGate

pkg/policies/policy_groups.go:223–233  ·  view source on GitHub ↗
(policyAtt *v1.PolicyAttachment, groupAtt *v1.PolicyGroupAttachment)

Source from the content-addressed store, hash-verified

221}
222
223func applyGroupGate(policyAtt *v1.PolicyAttachment, groupAtt *v1.PolicyGroupAttachment) *v1.PolicyAttachment {
224 if policyAtt == nil || groupAtt == nil || groupAtt.Gate == nil {
225 return policyAtt
226 }
227
228 cloned := proto.Clone(policyAtt).(*v1.PolicyAttachment)
229 groupGate := groupAtt.GetGate()
230 cloned.Gate = &groupGate
231
232 return cloned
233}
234
235type LoadPolicyGroupOptions struct {
236 Client v13.AttestationServiceClient

Callers 3

VerifyMaterialMethod · 0.85
VerifyStatementMethod · 0.85
TestApplyGroupGateMethod · 0.85

Calls 2

CloneMethod · 0.45
GetGateMethod · 0.45

Tested by 1

TestApplyGroupGateMethod · 0.68