The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/pkg/plugins/pfs/decl.go

30 lines
705 B

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
}