Documentation ¶
Index ¶
- func GetBackendPluginSecurePackageFiles() (map[string][]byte, error)
- func ToPackageName(input string) string
- func WriteBackendPluginHandler(metadata BackendPluginHandlerTemplateMetadata, out io.Writer) error
- func WriteBackendPluginMain(metadata BackendPluginRouterTemplateMetadata, out io.Writer) error
- func WriteBackendPluginRouter(metadata BackendPluginRouterTemplateMetadata, out io.Writer) error
- func WriteLineageGo(metadata LineageMetadata, out io.Writer) error
- func WriteOperatorConfig(out io.Writer) error
- func WriteOperatorKubeConfig(out io.Writer) error
- func WriteOperatorMain(metadata OperatorMainMetadata, out io.Writer) error
- func WriteResourceObject(metadata ResourceObjectTemplateMetadata, out io.Writer) error
- func WriteSchema(metadata SchemaMetadata, out io.Writer) error
- func WriteWatcher(metadata WatcherMetadata, out io.Writer) error
- func WriteWrappedType(metadata WrappedTypeMetadata, out io.Writer) error
- type BackendPluginHandlerTemplateMetadata
- type BackendPluginRouterTemplateMetadata
- type LineageMetadata
- type ObjectMetadataField
- type OperatorMainMetadata
- type ResourceObjectTemplateMetadata
- type SchemaMetadata
- type SubresourceMetadata
- type WatcherMetadata
- type WrappedTypeMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBackendPluginSecurePackageFiles ¶
GetBackendPluginSecurePackageFiles returns go files for the `secure` package in the backend plugin, as a map of <filename> (without "secure" in path) => contents
func ToPackageName ¶ added in v0.14.0
ToPackageName sanitizes an input into a deterministic allowed go package name. It is used to turn kind names or versions into package names when performing go code generation.
func WriteBackendPluginHandler ¶
func WriteBackendPluginHandler(metadata BackendPluginHandlerTemplateMetadata, out io.Writer) error
WriteBackendPluginHandler executes the Backend Plugin Handler template, and writes out the generated go code to out
func WriteBackendPluginMain ¶
func WriteBackendPluginMain(metadata BackendPluginRouterTemplateMetadata, out io.Writer) error
WriteBackendPluginMain executes the Backend Plugin Main template, and writes out the generated go code to out
func WriteBackendPluginRouter ¶
func WriteBackendPluginRouter(metadata BackendPluginRouterTemplateMetadata, out io.Writer) error
WriteBackendPluginRouter executes the Backend Plugin Router template, and writes out the generated go code to out
func WriteLineageGo ¶
func WriteLineageGo(metadata LineageMetadata, out io.Writer) error
WriteLineageGo executes the lineage go template, and writes out the generated go code to out
func WriteOperatorConfig ¶ added in v0.11.0
func WriteOperatorKubeConfig ¶
func WriteOperatorMain ¶
func WriteOperatorMain(metadata OperatorMainMetadata, out io.Writer) error
func WriteResourceObject ¶
func WriteResourceObject(metadata ResourceObjectTemplateMetadata, out io.Writer) error
WriteResourceObject executes the Resource Object template, and writes out the generated go code to out
func WriteSchema ¶
func WriteSchema(metadata SchemaMetadata, out io.Writer) error
WriteSchema executes the Resource Schema template, and writes out the generated go code to out
func WriteWatcher ¶
func WriteWatcher(metadata WatcherMetadata, out io.Writer) error
func WriteWrappedType ¶
func WriteWrappedType(metadata WrappedTypeMetadata, out io.Writer) error
WriteWrappedType executes the wrappedtype go template, and writes out the generated go code to out
Types ¶
type BackendPluginHandlerTemplateMetadata ¶
type BackendPluginHandlerTemplateMetadata struct { codegen.KindProperties Repo string APICodegenPath string TypeName string IsResource bool Version string }
BackendPluginHandlerTemplateMetadata is the metadata required by the Backend Plugin Handler template
func (BackendPluginHandlerTemplateMetadata) ToPackageName ¶ added in v0.14.0
func (BackendPluginHandlerTemplateMetadata) ToPackageName(input string) string
type BackendPluginRouterTemplateMetadata ¶
type BackendPluginRouterTemplateMetadata struct { Repo string APICodegenPath string Resources []codegen.KindProperties PluginID string ResourcesAreVersioned bool }
BackendPluginRouterTemplateMetadata is the metadata required by the Backend Plugin Router template
func (BackendPluginRouterTemplateMetadata) ToPackageName ¶ added in v0.14.0
func (BackendPluginRouterTemplateMetadata) ToPackageName(input string) string
type LineageMetadata ¶
type LineageMetadata struct { Package string TypeName string CUEFile string CUESelector string SchemaPackagePath string SchemaPackageName string ObjectTypeName string Subresources []SubresourceMetadata }
LineageMetadata is the metadata required by the lineage go code template
type ObjectMetadataField ¶
type OperatorMainMetadata ¶
type OperatorMainMetadata struct { PackageName string ProjectName string Repo string CodegenPath string WatcherPackage string ResourcesAreVersioned bool Resources []codegen.KindProperties }
func (OperatorMainMetadata) ToPackageName ¶ added in v0.14.0
func (OperatorMainMetadata) ToPackageName(input string) string
type ResourceObjectTemplateMetadata ¶
type ResourceObjectTemplateMetadata struct { Package string TypeName string SpecTypeName string ObjectTypeName string ObjectShortName string Subresources []SubresourceMetadata CustomMetadataFields []ObjectMetadataField }
ResourceObjectTemplateMetadata is the metadata required by the Resource Object template
type SchemaMetadata ¶
type SchemaMetadata struct { Package string Group string Version string Kind string Plural string Scope string }
SchemaMetadata is the metadata required by the Resource Schema template
type SubresourceMetadata ¶
SubresourceMetadata is subresource information used in templates
type WatcherMetadata ¶
type WatcherMetadata struct { codegen.KindProperties PackageName string Repo string CodegenPath string Version string }
func (WatcherMetadata) ToPackageName ¶ added in v0.14.0
func (WatcherMetadata) ToPackageName(input string) string