mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 00:55:16 +08:00
Codegen: Isolate schema generation code (#98742)
* Create go.mod files for plugins and core kinds * Update go work and main go.mod dependencies * Update pfs import * Missing update of pfs dependency * Remove fixed cuelang dependency * Update codeowners * Update workspace * Update Dockerfile * Missing go.mod codeowner * Use intermediate kin-openapi dependency to make all workspaces to work
This commit is contained in:
22
pkg/plugins/codegen/pfs/plugin.go
Normal file
22
pkg/plugins/codegen/pfs/plugin.go
Normal file
@ -0,0 +1,22 @@
|
||||
package pfs
|
||||
|
||||
import (
|
||||
"cuelang.org/go/cue"
|
||||
"cuelang.org/go/cue/ast"
|
||||
)
|
||||
|
||||
// ParsedPlugin represents everything knowable about a single plugin from static
|
||||
// analysis of its filesystem tree contents, as performed by [ParsePluginFS].
|
||||
//
|
||||
// Guarantees described in the below comments only exist for instances of this
|
||||
// struct returned from [ParsePluginFS].
|
||||
type ParsedPlugin struct {
|
||||
// Properties contains the plugin's definition, as declared in plugin.json.
|
||||
Properties Metadata
|
||||
CueFile cue.Value
|
||||
Variant SchemaInterface
|
||||
|
||||
// CUEImports lists the CUE import statements in the plugin's grafanaplugin CUE
|
||||
// package, if any.
|
||||
CUEImports []*ast.ImportSpec
|
||||
}
|
Reference in New Issue
Block a user