config

package
v0.0.0-...-1c351ce Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2018 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirAssets

func DirAssets() (string, error)

DirAssets assets directory

func DirMain

func DirMain() (string, error)

DirMain main boshspecs dir

func DirTest

func DirTest() (string, error)

DirTest test files dir

func InitializeDir

func InitializeDir() error

InitializeDir create directories

Types

type CBosh

type CBosh struct {
	Name         string `yaml:"name"`
	CLIPath      string `yaml:"cli-path"`
	CreateEnv    bool   `yaml:"create-env"`
	Environment  string `yaml:"environment"`
	Client       string `yaml:"client"`
	ClientSecret string `yaml:"client-secret"`
	CaCert       string `yaml:"ca-cert"`
}

CBosh represents bosh configuration either a director

type CDeployment

type CDeployment struct {
	Name      string  `yaml:"name"`
	ConfSpecs []CSpec `yaml:"specs"`
}

CDeployment represents single bosh deployment configuration

type CInstanceFilters

type CInstanceFilters struct {
	InstanceGroup string   `yaml:"instance_group"`
	Instances     []string `yaml:"instances"`
}

CInstanceFilters filters where to run instances

type CSpec

type CSpec struct {
	Name      string            `yaml:"name"`
	SpecType  string            `yaml:"type"`
	Path      string            `yaml:"path"`
	LocalExec bool              `yaml:"local_exec"`
	Sudo      bool              `yaml:"sudo"`
	Filters   CInstanceFilters  `yaml:"filters"`
	Envs      map[string]string `yaml:"envs"`
	Params    interface{}       `yaml:"params"`
}

CSpec specs that will run

type Config

type Config struct {
	ConfBosh          []CBosh       `yaml:"bosh"`
	ConfSpecs         []CSpec       `yaml:"specs"`
	ConfigDeployments []CDeployment `yaml:"deployments"`
}

Config represents the config read from file

func InitConfig

func InitConfig(configFile string) (Config, error)

InitConfig begin parsing the config file

type MergedConfig

type MergedConfig struct {
	ConfBosh         CBosh
	ConfigDeployment CDeployment
	ConfSpec         CSpec
}

MergedConfig represents one merged configuration

func Merge

func Merge(specConfig Config) []MergedConfig

Merge config to flat line verify

Jump to

Keyboard shortcuts

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