Expressions: Create json schema for query types (#84032)

This commit is contained in:
Ryan McKinley
2024-03-26 06:58:56 +02:00
committed by GitHub
parent 2e06677240
commit 4cda34ff7d
40 changed files with 4649 additions and 654 deletions
@@ -10,6 +10,7 @@ import (
"github.com/grafana/grafana-plugin-sdk-go/backend/resource/httpadapter"
"github.com/grafana/grafana-plugin-sdk-go/data"
"github.com/grafana/grafana/pkg/tsdb/grafana-testdata-datasource/kinds"
"github.com/grafana/grafana/pkg/tsdb/grafana-testdata-datasource/sims"
)
@@ -19,7 +20,7 @@ import (
func ProvideService() *Service {
s := &Service{
queryMux: datasource.NewQueryTypeMux(),
scenarios: map[string]*Scenario{},
scenarios: map[kinds.TestDataQueryType]*Scenario{},
frame: data.NewFrame("testdata",
data.NewField("Time", nil, make([]time.Time, 1)),
data.NewField("Value", nil, make([]float64, 1)),
@@ -48,7 +49,7 @@ func ProvideService() *Service {
type Service struct {
logger log.Logger
scenarios map[string]*Scenario
scenarios map[kinds.TestDataQueryType]*Scenario
frame *data.Frame
labelFrame *data.Frame
queryMux *datasource.QueryTypeMux