Documentation ¶
Index ¶
- func GroupResource2String(gr schema.GroupResource) string
- func String2GroupResource(s string) (schema.GroupResource, error)
- type ConfigGenerator
- func (r *ConfigGenerator) AddFiles(ctx context.Context, provider, name, data string) error
- func (r *ConfigGenerator) AddGroupResource(gr schema.GroupResource)
- func (r *ConfigGenerator) Build(ctx context.Context, resourceClient resourceclient.Client, ...) error
- func (r *ConfigGenerator) BuildProviderMap(ul *unstructured.UnstructuredList) (map[string]string, error)
- func (r *ConfigGenerator) GetResources(ctx context.Context) (*unstructured.UnstructuredList, error)
- func (r *ConfigGenerator) UpdateRenderer(ctx context.Context) error
- func (r *ConfigGenerator) ValidateLangTech(ctx context.Context, provider, ext string) error
- type ProviderCtx
- type RenderFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GroupResource2String ¶
func GroupResource2String(gr schema.GroupResource) string
func String2GroupResource ¶
func String2GroupResource(s string) (schema.GroupResource, error)
Types ¶
type ConfigGenerator ¶
type ConfigGenerator struct { ConfigGenerator *choreov1alpha1.ConfigGenerator Providers store.Storer[*ProviderCtx] GVs sets.Set[schema.GroupResource] // contains filtered or unexported fields }
func New ¶
func New(cg *choreov1alpha1.ConfigGenerator) *ConfigGenerator
func (*ConfigGenerator) AddFiles ¶
func (r *ConfigGenerator) AddFiles(ctx context.Context, provider, name, data string) error
func (*ConfigGenerator) AddGroupResource ¶
func (r *ConfigGenerator) AddGroupResource(gr schema.GroupResource)
func (*ConfigGenerator) Build ¶
func (r *ConfigGenerator) Build(ctx context.Context, resourceClient resourceclient.Client, discoveryClient discovery.CachedDiscoveryInterface, branchName string) error
func (*ConfigGenerator) BuildProviderMap ¶
func (r *ConfigGenerator) BuildProviderMap(ul *unstructured.UnstructuredList) (map[string]string, error)
func (*ConfigGenerator) GetResources ¶
func (r *ConfigGenerator) GetResources(ctx context.Context) (*unstructured.UnstructuredList, error)
func (*ConfigGenerator) UpdateRenderer ¶
func (r *ConfigGenerator) UpdateRenderer(ctx context.Context) error
func (*ConfigGenerator) ValidateLangTech ¶
func (r *ConfigGenerator) ValidateLangTech(ctx context.Context, provider, ext string) error
we validate if the langtech is valid and if there is consistency with all the files as only a single langtech type per vendor is supported
type ProviderCtx ¶
type ProviderCtx struct { LangTech choreov1alpha1.LangTechType Files map[string]string Renderer RenderFn }
type RenderFn ¶
type RenderFn func(ctx context.Context, template string, u *unstructured.Unstructured, w io.Writer) error
Click to show internal directories.
Click to hide internal directories.