CloudWatch: move QueryData input parsing types to separate package (#57165)

* CloudWatch: move parse request types separate package

* Move metric query constants, unexport metricDataQuery json decoding type

* Unexport isSearchExpression
This commit is contained in:
Shirley
2022-10-20 11:21:13 +02:00
committed by GitHub
parent ee6ff18122
commit cadc6088db
15 changed files with 280 additions and 267 deletions
+2 -1
View File
@@ -8,6 +8,7 @@ import (
"github.com/grafana/grafana/pkg/infra/log"
"github.com/grafana/grafana/pkg/services/featuremgmt"
"github.com/grafana/grafana/pkg/tsdb/cloudwatch/cwlog"
"github.com/grafana/grafana/pkg/tsdb/cloudwatch/models"
"golang.org/x/sync/errgroup"
)
@@ -30,7 +31,7 @@ func (e *cloudWatchExecutor) executeTimeSeriesQuery(ctx context.Context, req *ba
return nil, fmt.Errorf("invalid time range: start time must be before end time")
}
requestQueriesByRegion, err := parseQueries(req.Queries, startTime, endTime, e.features.IsEnabled(featuremgmt.FlagCloudWatchDynamicLabels))
requestQueriesByRegion, err := models.ParseQueries(req.Queries, startTime, endTime, e.features.IsEnabled(featuremgmt.FlagCloudWatchDynamicLabels))
if err != nil {
return nil, err
}