Kindsys: Target k8s style resource definitions (#67008)
Co-authored-by: sam boyer <sdboyer@grafana.com>
This commit is contained in:
co-authored by
sam boyer
parent
b71b778d0d
commit
ca1f79b9ba
+8
-1
@@ -3,6 +3,7 @@ package codegen
|
||||
import (
|
||||
"bytes"
|
||||
"embed"
|
||||
"strings"
|
||||
"text/template"
|
||||
"time"
|
||||
|
||||
@@ -15,7 +16,8 @@ var tmpls *template.Template
|
||||
|
||||
func init() {
|
||||
base := template.New("codegen").Funcs(template.FuncMap{
|
||||
"now": time.Now,
|
||||
"now": time.Now,
|
||||
"ToLower": strings.ToLower,
|
||||
})
|
||||
tmpls = template.Must(base.ParseFS(tmplFS, "tmpl/*.tmpl"))
|
||||
}
|
||||
@@ -46,6 +48,11 @@ type (
|
||||
tvars_coremodel_imports struct {
|
||||
PackageName string
|
||||
}
|
||||
tvars_resource struct {
|
||||
PackageName string
|
||||
KindName string
|
||||
SubresourceNames []string
|
||||
}
|
||||
)
|
||||
|
||||
type HeaderVars = tvars_autogen_header
|
||||
|
||||
Reference in New Issue
Block a user