Introduce "scuemata" system for CUE-based specification of Grafana objects (#32527)

This commit is contained in:
sam boyer
2021-04-08 04:11:11 -04:00
committed by GitHub
parent 7351645d63
commit bba4d9bd7f
87 changed files with 2446 additions and 1136 deletions

21
embed.go Normal file
View File

@ -0,0 +1,21 @@
package grafana
import (
"embed"
"io/fs"
)
// CoreSchema embeds all CUE files within the cue/ subdirectory.
//
// TODO good rule about where to search
//
//go:embed cue/*/*.cue
var CoreSchema embed.FS
// TODO good rule about where to search
//
//go:embed public/app/plugins/*/*/*.cue public/app/plugins/*/*/plugin.json
var base embed.FS
// PluginSchema embeds all CUE files within the public/ subdirectory.
var PluginSchema, _ = fs.Sub(base, "public/app/plugins")