mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
plugindef: Move pluginmeta out of coremodels as standalone thema lineage (#56765)
* Get pluginmeta mostly moved over to pkg/plugins/plugindef * Remove dead func * Fix up pfs, use sync.Once in plugindef * Update to latest thema * Chase Endec->Codec conversion in Thema * Comments on slash header gen; use ToSlash * Also generate JSON schema for plugindef * Generate JSON Schema as well * Fix slot loading from kindsys cue decls * Remove unused vars * skip generating plugin.schema.json for now Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
This commit is contained in:
@@ -24,7 +24,7 @@ const rootrel string = "kinds/structured/dashboard"
|
||||
// TODO standard generated docs
|
||||
type Kind struct {
|
||||
lin thema.ConvergentLineage[*Dashboard]
|
||||
jendec vmux.Endec
|
||||
jcodec vmux.Codec
|
||||
valmux vmux.ValueMux[*Dashboard]
|
||||
decl kindsys.Decl[kindsys.CoreStructuredMeta]
|
||||
}
|
||||
@@ -56,9 +56,9 @@ func NewKind(rt *thema.Runtime, opts ...thema.BindOption) (*Kind, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
k.jendec = vmux.NewJSONEndec("dashboard.json")
|
||||
k.jcodec = vmux.NewJSONCodec("dashboard.json")
|
||||
k.lin = tsch.ConvergentLineage()
|
||||
k.valmux = vmux.NewValueMux(k.lin.TypedSchema(), k.jendec)
|
||||
k.valmux = vmux.NewValueMux(k.lin.TypedSchema(), k.jcodec)
|
||||
return k, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ const rootrel string = "kinds/structured/playlist"
|
||||
// TODO standard generated docs
|
||||
type Kind struct {
|
||||
lin thema.ConvergentLineage[*Playlist]
|
||||
jendec vmux.Endec
|
||||
jcodec vmux.Codec
|
||||
valmux vmux.ValueMux[*Playlist]
|
||||
decl kindsys.Decl[kindsys.CoreStructuredMeta]
|
||||
}
|
||||
@@ -56,9 +56,9 @@ func NewKind(rt *thema.Runtime, opts ...thema.BindOption) (*Kind, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
k.jendec = vmux.NewJSONEndec("playlist.json")
|
||||
k.jcodec = vmux.NewJSONCodec("playlist.json")
|
||||
k.lin = tsch.ConvergentLineage()
|
||||
k.valmux = vmux.NewValueMux(k.lin.TypedSchema(), k.jendec)
|
||||
k.valmux = vmux.NewValueMux(k.lin.TypedSchema(), k.jcodec)
|
||||
return k, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user