Codegen: Generate Golang code using cog (#98812)

* Use cog for Go types

* Delete old generation code

* Fix plugins generation

* workspaces update

* Update datasources with new generated code

* More fixes

* Update swagger and openapi specs

* Fixes

* More files...

* Update workspace

* More fixes...

* Remove unused functions
This commit is contained in:
Selene
2025-01-14 15:58:38 +01:00
committed by GitHub
parent b96a752db3
commit 7151ea6abc
58 changed files with 4910 additions and 4202 deletions
+2 -3
View File
@@ -13,7 +13,6 @@ import (
"github.com/grafana/grafana-plugin-sdk-go/data"
"github.com/grafana/grafana/pkg/tsdb/cloudwatch/kinds/dataquery"
"github.com/grafana/grafana/pkg/tsdb/cloudwatch/models"
"github.com/grafana/grafana/pkg/tsdb/cloudwatch/utils"
)
const initialAlertPollPeriod = time.Second
@@ -39,9 +38,9 @@ var executeSyncLogQuery = func(ctx context.Context, e *cloudWatchExecutor, req *
logsQuery.QueryString = *logsQuery.Expression
}
region := utils.Depointerizer(logsQuery.Region)
region := logsQuery.Region
if region == "" || region == defaultRegion {
logsQuery.Region = utils.Pointer(instance.Settings.Region)
logsQuery.Region = instance.Settings.Region
}
logsClient, err := e.getCWLogsClient(ctx, req.PluginContext, region)