MCPcopy Create free account
hub / github.com/clouditor/clouditor / getCertificationTargets

Function getCertificationTargets

cli/session.go:434–459  ·  view source on GitHub ↗
(_ string)

Source from the content-addressed store, hash-verified

432}
433
434func getCertificationTargets(_ string) []string {
435 var (
436 err error
437 session *Session
438 client orchestrator.OrchestratorClient
439 res *orchestrator.ListCertificationTargetsResponse
440 )
441
442 if session, err = ContinueSession(); err != nil {
443 fmt.Printf("Error while retrieving the session. Please re-authenticate.\n")
444 return nil
445 }
446
447 client = orchestrator.NewOrchestratorClient(session)
448
449 if res, err = client.ListCertificationTargets(context.Background(), &orchestrator.ListCertificationTargetsRequest{}); err != nil {
450 return []string{}
451 }
452
453 var metrics []string
454 for _, v := range res.Targets {
455 metrics = append(metrics, fmt.Sprintf("%s\t%s: %s", v.Id, v.Name, v.Description))
456 }
457
458 return metrics
459}

Callers 1

Calls 3

NewOrchestratorClientFunction · 0.92
ContinueSessionFunction · 0.85

Tested by

no test coverage detected