mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 02:23:31 -06:00
* kindsys: Remove defs, Slot->SchemaInterface * Remove excess file * Fix up tests * Regenerate kinds report * Final bits of cleanup * Stop complaining, linter * Update pkg/kindsys/kindcat_composable.cue Co-authored-by: Tania <yalyna.ts@gmail.com> Co-authored-by: Tania <yalyna.ts@gmail.com>
29 lines
657 B
Go
29 lines
657 B
Go
package pfs
|
|
|
|
import (
|
|
"cuelang.org/go/cue/ast"
|
|
"github.com/grafana/grafana/pkg/kindsys"
|
|
"github.com/grafana/grafana/pkg/plugins/plugindef"
|
|
"github.com/grafana/thema"
|
|
)
|
|
|
|
type PluginDecl struct {
|
|
SchemaInterface *kindsys.SchemaInterface
|
|
Lineage thema.Lineage
|
|
Imports []*ast.ImportSpec
|
|
PluginPath string
|
|
PluginMeta plugindef.PluginDef
|
|
}
|
|
|
|
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
|
|
}
|