mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
30 lines
716 B
Go
30 lines
716 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
|
|
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
|
|
}
|