MCPcopy Create free account
hub / github.com/rilldata/rill / GenerateReportYAML

Method GenerateReportYAML

admin/server/reports.go:535–549  ·  view source on GitHub ↗
(ctx context.Context, req *adminv1.GenerateReportYAMLRequest)

Source from the content-addressed store, hash-verified

533}
534
535func (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
551func (s *Server) yamlForManagedReport(opts *adminv1.ReportOptions, ownerUserID string) ([]byte, error) {
552 res := reportYAML{}

Callers

nothing calls this directly

Calls 5

AddRequestAttributesFunction · 0.92
StringMethod · 0.65
ErrorfMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected