conf

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Default deployment package config file name
	DEFAULT_DEPLOY_CONFIG_FILE_NAME = "stacks.yaml"
)

Variables

This section is empty.

Functions

func LoadValues

func LoadValues(root string, passwords []string) (map[string]string, error)

Load Values from value directories. The order of value override is always following the lexical order of the file names

func MergeValues

func MergeValues(target, replace map[string]string) map[string]string

Merge two maps

Types

type DeployConfig

type DeployConfig struct {
	// Name of the s3 bucket for uploading template
	S3Bucket string `yaml:"s3Bucket"`

	// Template directory
	TemplateDir string `yaml:"templateDir"`

	// Environments directory
	EnvDir string `yaml:"envDir"`

	// Template directory
	ParamDir string `yaml:"paramDir"`

	// Stacks config
	Stacks []*StackConfig `yaml:"stacks"`
	// contains filtered or unexported fields
}

Deploy configuration

func NewDeployConfig

func NewDeployConfig(file string) (*DeployConfig, error)

Load deploy config from file. If no file path given, default to lookup file "stacks.yaml" at current directory.

func (*DeployConfig) GetEnvDirPath

func (dc *DeployConfig) GetEnvDirPath(n string) string

func (*DeployConfig) GetParamPath

func (dc *DeployConfig) GetParamPath(n string) string

func (*DeployConfig) GetStackConfigByName

func (dc *DeployConfig) GetStackConfigByName(n string) *StackConfig

Return a stack config by its name

func (*DeployConfig) GetStackList

func (dc *DeployConfig) GetStackList(f map[string]string) map[string]*StackConfig

Find stack config for given list

func (*DeployConfig) GetTplPath

func (dc *DeployConfig) GetTplPath(n string) string

func (*DeployConfig) Validate

func (dc *DeployConfig) Validate() error

Validate path configuration

type StackConfig

type StackConfig struct {
	// Name of the stack
	Name string `yaml:"name"`

	// Template relative path
	Tpl string `yaml:"tpl"`

	// Parameter file relative path
	Param string `yaml:"param,omitempty"`

	Tags map[string]string `yaml:"tags,omitempty"`
}

Stack configuration

Jump to

Keyboard shortcuts

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