(ctx context.Context, req *adminv1.GenerateReportYAMLRequest)
| 533 | } |
| 534 | |
| 535 | func (s *Server) GenerateReportYAML(ctx context.Context, req *adminv1.GenerateReportYAMLRequest) (*adminv1.GenerateReportYAMLResponse, error) { |
| 536 | observability.AddRequestAttributes(ctx, |
| 537 | attribute.String("args.organization", req.Org), |
| 538 | attribute.String("args.project", req.Project), |
| 539 | ) |
| 540 | |
| 541 | data, err := s.yamlForCommittedReport(req.Options) |
| 542 | if err != nil { |
| 543 | return nil, status.Errorf(codes.InvalidArgument, "failed to generate report YAML: %s", err.Error()) |
| 544 | } |
| 545 | |
| 546 | return &adminv1.GenerateReportYAMLResponse{ |
| 547 | Yaml: string(data), |
| 548 | }, nil |
| 549 | } |
| 550 | |
| 551 | func (s *Server) yamlForManagedReport(opts *adminv1.ReportOptions, ownerUserID string) ([]byte, error) { |
| 552 | res := reportYAML{} |
nothing calls this directly
no test coverage detected