QueryTypes: Add feature toggle to show query types in datasource apiservers (#88213)

* initial attempt

* show query types

* show query types

* with formatting

* with formatting

* more cleanup

* add feature toggle

* fix build
This commit is contained in:
Ryan McKinley
2024-05-23 19:46:28 +03:00
committed by GitHub
parent 006d0021e3
commit 42b0f802de
17 changed files with 590 additions and 244 deletions

View File

@@ -1,7 +1,6 @@
package expr
import (
"embed"
"fmt"
"strings"
@@ -178,13 +177,6 @@ func (h *ExpressionQueryReader) ReadQuery(
return eq, err
}
//go:embed query.types.json
var f embed.FS
func (h *ExpressionQueryReader) QueryTypeDefinitionListJSON() ([]byte, error) {
return f.ReadFile("query.types.json")
}
func getReferenceVar(exp string, refId string) (string, error) {
exp = strings.TrimPrefix(exp, "$")
if exp == "" {