Documentation ¶
Index ¶
- Constants
- Variables
- func InputReconciler(params CrossGroupTemplateParameters) model.CustomTemplates
- func InputSnapshot(params CrossGroupTemplateParameters) model.CustomTemplates
- func InputSnapshotManualBuilder(params CrossGroupTemplateParameters) model.CustomTemplates
- func OutputSnapshot(params CrossGroupTemplateParameters) model.CustomTemplates
- type CrossGroupTemplateParameters
Constants ¶
View Source
const ( SetOutputFilename = "sets/sets.go" SetCustomTemplatePath = "sets/sets.gotmpl" )
Sets custom template
View Source
const ( ClientProvidersOutputFilename = "providers/client_providers.go" ClientProvidersCustomTemplatePath = "providers/client_providers.gotmpl" )
ClientProviders custom template
View Source
const (
InputReconcilerCustomTemplatePath = "input/input_reconciler.gotmpl"
)
InputReconciler custom template
View Source
const (
InputSnapshotCustomTemplatePath = "input/input_snapshot.gotmpl"
)
InputSnapshot custom template
View Source
const (
InputSnapshotManualBuilderCustomTemplatePath = "input/input_snapshot_manual_builder.gotmpl"
)
InputSnapshot test builder custom template
View Source
const (
OutputSnapshotCustomTemplatePath = "output/output_snapshot.gotmpl"
)
OutputSnapshot custom template
Variables ¶
View Source
var AllGroupCustomTemplates []model.CustomTemplates
use to get all group-level templates in contrib
View Source
var ClientProviders = func() model.CustomTemplates { templateContents, err := templatesBox.FindString(ClientProvidersCustomTemplatePath) if err != nil { panic(err) } clientProvidersTemplate := model.CustomTemplates{ Templates: map[string]string{ClientProvidersOutputFilename: templateContents}, } AllGroupCustomTemplates = append(AllGroupCustomTemplates, clientProvidersTemplate) return clientProvidersTemplate }()
View Source
var Sets = func() model.CustomTemplates { templateContents, err := templatesBox.FindString(SetCustomTemplatePath) if err != nil { panic(err) } setsTemplates := model.CustomTemplates{ Templates: map[string]string{SetOutputFilename: templateContents}, } AllGroupCustomTemplates = append(AllGroupCustomTemplates, setsTemplates) return setsTemplates }()
Functions ¶
func InputReconciler ¶
func InputReconciler(params CrossGroupTemplateParameters) model.CustomTemplates
Returns the template for generating input reconcilers.
func InputSnapshot ¶
func InputSnapshot(params CrossGroupTemplateParameters) model.CustomTemplates
Returns the template for generating input snapshots.
func InputSnapshotManualBuilder ¶ added in v0.7.17
func InputSnapshotManualBuilder(params CrossGroupTemplateParameters) model.CustomTemplates
Returns the template for generating input snapshots.
func OutputSnapshot ¶
func OutputSnapshot(params CrossGroupTemplateParameters) model.CustomTemplates
Returns the template for generating output snapshots.
Types ¶
type CrossGroupTemplateParameters ¶
type CrossGroupTemplateParameters struct { // the path of the output file produced from this template. relative to project root. OutputFilename string // a map of Go modules to (a superset of) the imported codegen Groups. only required if the codegen group is defined in a different go module than the types (i.e. it is using a CustomTypesImportPath) SelectFromGroups map[string][]model.Group // a map of the GVKs to the resources which we want to include in the input snapshot. ResourcesToSelect map[schema.GroupVersion][]string }
Parameters for constructing templates that span across multiple Groups.
Click to show internal directories.
Click to hide internal directories.