grafana/embed.go
sam boyer 39f2ee7692
Make "dist" version of dashboard scuemata directly importable in CUE (#39251)
* Update embeds with new paths, remove deprefixing

* Add dist dashboard scuemata, in CUE

Also add tests that ensure all panel plugins with models.cue are
imported by this file, so that we can't go out of sync.

* Remove comment detritus

* Check error return

* Remove hardcoded path prefix from cli validator
2021-09-17 16:17:55 -04:00

17 lines
534 B
Go

package grafana
import (
"embed"
)
// CoreSchema embeds all core CUE files, which live in packages/grafana-schema/src
//
//go:embed cue.mod cue packages/grafana-schema/src/schema/*.cue packages/grafana-schema/src/scuemata/*/*.cue packages/grafana-schema/src/scuemata/*/*/*.cue
var CoreSchema embed.FS
// PluginSchema embeds all expected plugin CUE files and plugin metadata from
// within the public/app/plugins subdirectory.
//
//go:embed public/app/plugins/*/*/*.cue public/app/plugins/*/*/plugin.json
var PluginSchema embed.FS