mirror of
https://github.com/grafana/grafana.git
synced 2025-02-11 16:15:42 -06:00
* extract kindsys * reinstate kindsys report This may end up living somewhere else (or not! who knows!), but the important part is that I don't get rid of it right now :) I hate the package layout (kindsysreport/codegen) for the main function and will take pretty much any alternative suggestion, but we can change also change it later. Note that the generated report.json is in a different location - anything using this (ops something) needs to be updated. * kindsysreport in codeowners
31 lines
705 B
Go
31 lines
705 B
Go
package pfs
|
|
|
|
import (
|
|
"cuelang.org/go/cue/ast"
|
|
"github.com/grafana/kindsys"
|
|
"github.com/grafana/thema"
|
|
|
|
"github.com/grafana/grafana/pkg/plugins/plugindef"
|
|
)
|
|
|
|
type PluginDecl struct {
|
|
SchemaInterface *kindsys.SchemaInterface
|
|
Lineage thema.Lineage
|
|
Imports []*ast.ImportSpec
|
|
PluginPath string
|
|
PluginMeta plugindef.PluginDef
|
|
KindDecl kindsys.Def[kindsys.ComposableProperties]
|
|
}
|
|
|
|
func EmptyPluginDecl(path string, meta plugindef.PluginDef) *PluginDecl {
|
|
return &PluginDecl{
|
|
PluginPath: path,
|
|
PluginMeta: meta,
|
|
Imports: make([]*ast.ImportSpec, 0),
|
|
}
|
|
}
|
|
|
|
func (decl *PluginDecl) HasSchema() bool {
|
|
return decl.Lineage != nil && decl.SchemaInterface != nil
|
|
}
|