configgenerator

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

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 (*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 (*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

Directories

Path Synopsis
gotemplates

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL