addons

package
v0.0.28 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateAddon

func GenerateAddon(addons embed.FS, provider, addon, dest string, userInputs map[string]string, templateWriter templatewriter.TemplateWriter) error

func GetAddonPath added in v0.0.24

func GetAddonPath(addons embed.FS, provider, addon string) (string, error)

func PromptAddon added in v0.0.24

func PromptAddon(addons embed.FS, provider string) (string, error)

func PromptAddonValues added in v0.0.24

func PromptAddonValues(dest string, userInputs map[string]string, addOnConfig AddonConfig) (map[string]string, error)

Types

type AddonConfig added in v0.0.26

type AddonConfig struct {
	config.DraftConfig  `yaml:",inline"`
	ReferenceComponents map[string][]referenceResource `yaml:"references"`
	// contains filtered or unexported fields
}

AddonConfig is a struct that extends the base DraftConfig to allow for the Referencing previously generated k8s objects. This allows an addon creator to reference pre-entered data from the deployment files.

func GetAddonConfig added in v0.0.24

func GetAddonConfig(addons embed.FS, provider, addon string) (AddonConfig, error)

func (*AddonConfig) GetAddonDestPath added in v0.0.26

func (ac *AddonConfig) GetAddonDestPath(dest string) (string, error)

func (*AddonConfig) GetReferenceValueMap added in v0.0.26

func (ac *AddonConfig) GetReferenceValueMap(dest string) (map[string]string, error)

GetReferenceValueMap extracts k8s object values into a mapping of template strings to k8s object value.

type Reference added in v0.0.26

type Reference interface {
	GetReferenceVariables([]referenceResource) map[string]string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳