Documentation
¶
Index ¶
- func PreprocessContent(content []byte, vars map[string]any) ([]byte, error)
- func PreprocessContentIntoWriter(content []byte, vars map[string]any, writer io.Writer) error
- func PreprocessFile(templateFilePath string, vars map[string]any) ([]byte, error)
- type ConfigProvider
- type ConfigReplacements
- type VariableOverrides
- type Variables
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PreprocessContent ¶
PreprocessContent processes a gotemplate from memory
Types ¶
type ConfigProvider ¶
type ConfigProvider interface { Validate(cloud, deployEnv string) error GetVariables(cloud, deployEnv, region string, configReplacements *ConfigReplacements) (Variables, error) GetDeployEnvVariables(cloud, deployEnv string, configReplacements *ConfigReplacements) (Variables, error) GetRegions(cloud, deployEnv string) ([]string, error) GetRegionOverrides(cloud, deployEnv, region string, configReplacements *ConfigReplacements) (Variables, error) }
func NewConfigProvider ¶
func NewConfigProvider(config string) ConfigProvider
type ConfigReplacements ¶
type ConfigReplacements struct { RegionReplacement string RegionShortReplacement string StampReplacement string }
func DefaultConfigReplacements ¶
func DefaultConfigReplacements() *ConfigReplacements
func NewConfigReplacements ¶
func NewConfigReplacements(regionReplacement, regionShortReplacement, stampReplacement string) *ConfigReplacements
func (*ConfigReplacements) AsMap ¶
func (c *ConfigReplacements) AsMap() map[string]interface{}
type VariableOverrides ¶
type VariableOverrides interface { GetDefaults() Variables GetCloudOverrides(cloud string) Variables GetDeployEnvOverrides(cloud, deployEnv string) Variables GetRegionOverrides(cloud, deployEnv, region string) Variables GetRegions(cloud, deployEnv string) []string GetSchema() string HasSchema() bool HasCloud(cloud string) bool HasDeployEnv(cloud, deployEnv string) bool }
func NewVariableOverrides ¶
func NewVariableOverrides() VariableOverrides
type Variables ¶
func InterfaceToVariables ¶
func MergeVariables ¶
Merges variables, returns merged variables However the return value is only used for recursive updates on the map The actual merged variables are updated in the base map
Click to show internal directories.
Click to hide internal directories.