(c context.Context, view models.View, arguments []int64, queryParameter string)
| 33 | } |
| 34 | |
| 35 | func (ctrl *Controller) StatsWithFilter(c context.Context, view models.View, arguments []int64, queryParameter string) (regionCount totalOutput, resourceCount totalOutput, costCount costOutput, err error) { |
| 36 | queries, err := ctrl.repo.GenerateFilterQuery(view, repository.ListStatsWithFilter, arguments, queryParameter) |
| 37 | if err != nil { |
| 38 | return |
| 39 | } |
| 40 | _, err = ctrl.repo.HandleQuery(c, repository.ListStatsWithFilter, ®ionCount, [][3]string{}, queries[0]) |
| 41 | if err != nil { |
| 42 | return |
| 43 | } |
| 44 | |
| 45 | // for resource count |
| 46 | _, err = ctrl.repo.HandleQuery(c, repository.ListStatsWithFilter, &resourceCount, [][3]string{}, queries[1]) |
| 47 | if err != nil { |
| 48 | return |
| 49 | } |
| 50 | |
| 51 | // for cost sum |
| 52 | _, err = ctrl.repo.HandleQuery(c, repository.ListStatsWithFilter, &costCount, [][3]string{}, queries[2]) |
| 53 | if err != nil { |
| 54 | return |
| 55 | } |
| 56 | return |
| 57 | } |
no test coverage detected