Kindsys: Replace DefForGen with kindsys.Kind (#62642)

* Kindsys: Replace DeclForGen with kindsys.Kind

DeclForGen was always unnecessary - it just wasn't obvious on initial
implementation, when we were focused on generating unique types for each
core kind. This removes it, considerably simplifying interactions with
kindsys - virtually everything now just relies on kindsys.Kind and its
derived interfaces.

* Removed unused jenny

* Rename params in jennies
This commit is contained in:
sam boyer
2023-01-31 19:40:15 -05:00
committed by GitHub
parent 0f0a53fbbb
commit 30b4205521
25 changed files with 273 additions and 543 deletions

View File

@ -7,6 +7,7 @@ import (
"time"
"github.com/grafana/codejen"
"github.com/grafana/grafana/pkg/kindsys"
)
// All the parsed templates in the tmpl subdirectory
@ -40,7 +41,7 @@ type (
// Header tvars_autogen_header
PackageName string
KindPackagePrefix string
Kinds []*DefForGen
Kinds []kindsys.Kind
}
tvars_coremodel_imports struct {
PackageName string