mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* New pfs impl * Reached codegen parity with old system * Update all models.cue inputs * Rename all models.cue files * Remove unused prefixfs * Changes Queries->DataQuery schema interface * Recodegen * All tests passing, nearly good now * Add SchemaInterface to kindsys props * Add pascal name deriver * Relocate plugin cue files again * Clarify use of injected fields * Remove unnecessary aliasing * Move DataQuery into mudball * Allow forcing ExpandReferences on go type generation * Move DataQuery def into kindsys, add generator to copy it to common * Fix copy generator to replace package name correctly * Fix duplicate type, test failure * Fix linting issues
32 lines
974 B
CUE
32 lines
974 B
CUE
package pfs
|
|
|
|
import (
|
|
"github.com/grafana/grafana/pkg/kindsys"
|
|
)
|
|
|
|
// GrafanaPlugin specifies what plugins may declare in .cue files in a
|
|
// `grafanaplugin` CUE package in the plugin root directory (adjacent to plugin.json).
|
|
GrafanaPlugin: {
|
|
// id and pascalName are injected from plugin.json. Plugin authors can write
|
|
// values for them in .cue files, but the only valid values will be the ones
|
|
// given in plugin.json.
|
|
id: string
|
|
pascalName: string
|
|
|
|
// A plugin defines its Composable kinds under this key.
|
|
//
|
|
// This struct is open for forwards compatibility - older versions of Grafana (or
|
|
// dependent tooling) should not break if new versions introduce additional schema interfaces.
|
|
composableKinds?: [Iface=string]: kindsys.Composable & {
|
|
name: pascalName + Iface
|
|
schemaInterface: Iface
|
|
lineage: name: pascalName + Iface
|
|
}
|
|
|
|
// A plugin defines its Custom kinds under this key.
|
|
customKinds?: [Name=string]: kindsys.Custom & {
|
|
name: Name
|
|
}
|
|
...
|
|
}
|