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

Function entToPolicyStatus

app/controlplane/pkg/data/workflowrun.go:385–402  ·  view source on GitHub ↗

entToPolicyStatus is the inverse of policyStatusToEnt.

(s workflowrun.PolicyStatus)

Source from the content-addressed store, hash-verified

383
384// entToPolicyStatus is the inverse of policyStatusToEnt.
385func entToPolicyStatus(s workflowrun.PolicyStatus) chainloop.PolicyStatus {
386 switch s {
387 case workflowrun.PolicyStatusNOT_APPLICABLE:
388 return chainloop.PolicyStatusNotApplicable
389 case workflowrun.PolicyStatusPASSED:
390 return chainloop.PolicyStatusPassed
391 case workflowrun.PolicyStatusSKIPPED:
392 return chainloop.PolicyStatusSkipped
393 case workflowrun.PolicyStatusWARNING:
394 return chainloop.PolicyStatusWarning
395 case workflowrun.PolicyStatusBLOCKED:
396 return chainloop.PolicyStatusBlocked
397 case workflowrun.PolicyStatusBYPASSED:
398 return chainloop.PolicyStatusBypassed
399 default:
400 return chainloop.PolicyStatusUnspecified
401 }
402}
403
404func (r *WorkflowRunRepo) GetBundle(ctx context.Context, wrID uuid.UUID) ([]byte, error) {
405 ctx, span := otelx.Start(ctx, workflowRunRepoTracer, "WorkflowRunRepo.GetBundle")

Callers 1

entWrPolicySummaryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected