kindsys: Return Decl from Kinds (#59075)

* kindsys: Return Decl from Kinds

* Add funcs to extract DeclForGen from kinds
This commit is contained in:
sam boyer
2022-11-21 17:50:06 -05:00
committed by GitHub
parent 57d6adbc7c
commit 6ac43c9cb4
8 changed files with 41 additions and 13 deletions
+2 -2
View File
@@ -58,7 +58,7 @@ type Raw interface {
Interface
// TODO docs
Meta() RawMeta
Decl() *Decl[RawMeta]
}
type Structured interface {
@@ -68,7 +68,7 @@ type Structured interface {
Lineage() thema.Lineage
// TODO docs
Meta() CoreStructuredMeta // TODO figure out how to reconcile this interface with CustomStructuredMeta
Decl() *Decl[CoreStructuredMeta] // TODO figure out how to reconcile this interface with CustomStructuredMeta
}
// type Composable interface {
+1 -1
View File
@@ -2,7 +2,7 @@ package kindsys
import "github.com/grafana/thema"
// CommonMeta contains the kind metadata common to all categories of kinds.
// CommonMeta contains the metadata common to all categories of kinds.
type CommonMeta struct {
Name string `json:"name"`
PluralName string `json:"pluralName"`