Documentation ¶
Index ¶
- Variables
- func EscapeGoTemplateOperators(d map[string]interface{})
- func KubeCodegen(group Group) error
- func PrependMockgenDirective(files []OutFile)
- func SetVersionForObject(obj metav1.Object, version string)
- type BuildRenderer
- type ChartRenderer
- type Field
- type Group
- type HeaderOverride
- type KubeCodeRenderer
- type MakeResourceFunc
- type ManifestsRenderer
- type OutFile
- func RenderApiTypes(grp Group) ([]OutFile, error)
- func RenderBuild(build model.Build) ([]OutFile, error)
- func RenderChart(chart model.Chart) ([]OutFile, error)
- func RenderManifests(appName, manifestDir, protoDir string, protoOpts protoutil.Options, ...) ([]OutFile, error)
- func RenderProtoTypes(grp Group) ([]OutFile, error)
- type ProtoCodeRenderer
- type Resource
- type TemplateRenderer
Constants ¶
This section is empty.
Variables ¶
View Source
var ClientsTemplates = inputTemplates{
"code/types/clients.gotmpl": {
Path: "clients.go",
},
"code/types/type_helpers.gotmpl": {
Path: "type_helpers.go",
},
}
View Source
var ControllerTemplates = inputTemplates{
"code/controller/event_handlers.gotmpl": {
Path: "controller/event_handlers.go",
},
"code/controller/reconcilers.gotmpl": {
Path: "controller/reconcilers.go",
},
"code/controller/multicluster_reconcilers.gotmpl": {
Path: "controller/multicluster_reconcilers.go",
},
}
View Source
var DefaultTemplateRenderer = templateRenderer{ // contains filtered or unexported fields }
View Source
var TypesTemplates = func(skipDeepCopy bool) inputTemplates { tmpl := inputTemplates{ "code/types/types.gotmpl": { Path: "types.go", }, "code/types/register.gotmpl": { Path: "register.go", }, "code/types/doc.gotmpl": { Path: "doc.go", }, "code/types/zz_generated.deepcopy.gotmpl": { Path: "zz_generated.deepcopy.go", }, } if skipDeepCopy { delete(tmpl, "code/types/zz_generated.deepcopy.gotmpl") } return tmpl }
Functions ¶
func EscapeGoTemplateOperators ¶ added in v0.28.0
func EscapeGoTemplateOperators(d map[string]interface{})
func KubeCodegen ¶
runs kubernetes code-generator.sh cannot be used to write output to memory also generates deecopy code
func PrependMockgenDirective ¶ added in v0.7.17
func PrependMockgenDirective(files []OutFile)
func SetVersionForObject ¶ added in v0.19.1
Types ¶
type BuildRenderer ¶
type BuildRenderer struct {
// contains filtered or unexported fields
}
renders files used to build the operator
type ChartRenderer ¶
type ChartRenderer struct {
// contains filtered or unexported fields
}
type HeaderOverride ¶ added in v0.28.0
type HeaderOverride interface {
Generate() string
}
type KubeCodeRenderer ¶
type KubeCodeRenderer struct { // the templates to use for rendering kube kypes TypesTemplates inputTemplates // the templates to use for rendering typed kube clients which use the underlying cache ClientsTemplates inputTemplates // the templates to use for rendering kube controllers ControllerTemplates inputTemplates // the go module of the project GoModule string // the relative path to the api dir // types will render in the package <module>/<apiRoot>/<group>/<version> ApiRoot string // contains filtered or unexported fields }
renders kubernetes from templates
func (KubeCodeRenderer) RenderCustomTemplates ¶
func (KubeCodeRenderer) RenderKubeCode ¶
func (r KubeCodeRenderer) RenderKubeCode(grp Group) ([]OutFile, error)
type MakeResourceFunc ¶
creates a k8s resource for a group this gets turned into a k8s manifest file
type ManifestsRenderer ¶
type ManifestsRenderer struct { AppName string // used for labeling ResourceFuncs map[OutFile]MakeResourceFunc ManifestDir string ProtoDir string }
renders kubernetes from templates
func (ManifestsRenderer) RenderManifests ¶
func (r ManifestsRenderer) RenderManifests(grp Group, protoOpts protoutil.Options, groupOptions model.GroupOptions) ([]OutFile, error)
type ProtoCodeRenderer ¶
type ProtoCodeRenderer struct { // the go module of the project GoModule string // the relative path to the api dir // types will render in the package <module>/<apiRoot>/<group>/<version> ApiRoot string // contains filtered or unexported fields }
renders kubernetes from templates
func (ProtoCodeRenderer) RenderCustomTemplates ¶
func (ProtoCodeRenderer) RenderProtoHelpers ¶
func (r ProtoCodeRenderer) RenderProtoHelpers(grp Group) ([]OutFile, error)
Click to show internal directories.
Click to hide internal directories.