subst

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVariables

func GetVariables(regex string) (envs map[string]interface{}, err error)

Types

type Build

type Build struct {
	Manifests     []map[interface{}]interface{}
	Kustomization *kustomize.Kustomize
	Substitutions *Substitutions
	// contains filtered or unexported fields
}

func New

func New(config config.Configuration) (build *Build, err error)

func (*Build) Build

func (b *Build) Build() (err error)

func (*Build) BuildSubstitutions added in v0.3.0

func (b *Build) BuildSubstitutions() (err error)

type Substitutions

type Substitutions struct {
	Subst  map[interface{}]interface{} `yaml:"subst"`
	Config SubstitutionsConfig         `yaml:"config"`

	Resources resmap.ResMap
	// contains filtered or unexported fields
}

func NewSubstitutions

func NewSubstitutions(cfg SubstitutionsConfig, decrypts []decrypt.Decryptor, res resmap.ResMap) (s *Substitutions, err error)

func (*Substitutions) Add

func (s *Substitutions) Add(data map[interface{}]interface{}, optimistic bool) (err error)

adds new data to the Substitutions

func (*Substitutions) Eval

func (s *Substitutions) Eval(data map[interface{}]interface{}, substs map[interface{}]interface{}, optimistic bool) (eval map[interface{}]interface{}, err error)

Merge merges the Substitutions with the given data

func (*Substitutions) Get

func (s *Substitutions) Get() map[interface{}]interface{}

Get returns the Substitutions as map[interface{}]interface{}

func (*Substitutions) GetMap

func (s *Substitutions) GetMap() map[string]interface{}

ToMap returns the Substitutions as map[string]interface{}

func (*Substitutions) Walk

func (s *Substitutions) Walk(path string, f fs.FileInfo) error

type SubstitutionsConfig

type SubstitutionsConfig struct {
	SubstKey         string `yaml:"subst_key"`
	EnvironmentRegex string `yaml:"environment_regex"`
	SubstFileRegex   string `yaml:"subst_file_pattern"`
	FlattenLowerCase bool   `yaml:"lowercase"`
}

Jump to

Keyboard shortcuts

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