config

package
v2.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 4, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PRECREATE Event name for plugins
	PRECREATE = "pre_create"
	// POSTCREATE Event name for plugins
	POSTCREATE = "post_create"
	// PREDELETE Event name for plugins
	PREDELETE = "pre_delete"
	// POSTDELETE Event name for plugins
	POSTDELETE = "post_delete"
)

Variables

View Source
var PluginRegistry = make(map[string][]RunPlugin)

PluginRegistry is a registry of plugins for certain events

Functions

func FillRegistry

func FillRegistry()

FillRegistry fill load in all the configured plugins.

func LoadCFStackConfig

func LoadCFStackConfig() []byte

LoadCFStackConfig Load the CF stack configuration file into a []byte.

func LoadConfigFileIfExists

func LoadConfigFileIfExists(dir string, file string) error

LoadConfigFileIfExists Search backwards from the current directory for a furnace config file with the given prefix of `file`. If found, the Configuration `Config` will be loaded with values gathered from the file described by that config. If none is found, nothing happens. The default file remains loaded.

returns an error if the file is not found.

Types

type Configuration

type Configuration struct {
	Main struct {
		Stackname string `yaml:"stackname"`
		Spinner   int    `yaml:"spinner"`
		Plugins   struct {
			EnablePluginSystem bool     `yaml:"enable_plugin_system"`
			PluginPath         string   `yaml:"plugin_path"`
			Names              []string `yaml:"names"`
		} `yaml:"plugins"`
	} `yaml:"main"`
	Aws struct {
		CodeDeployRole string `yaml:"code_deploy_role"`
		Region         string `yaml:"region"`
		TemplateName   string `yaml:"template_name"`
		AppName        string `yaml:"app_name"`
		CodeDeploy     struct {
			S3Bucket    string `yaml:"code_deploy_s3_bucket,omitempty"`
			S3Key       string `yaml:"code_deploy_s3_key,omitempty"`
			GitAccount  string `yaml:"git_account,omitempty"`
			GitRevision string `yaml:"git_revision,omitempty"`
		} `yaml:"code_deploy"`
	} `yaml:"aws"`
}

Configuration object with all the properties that AWS needs.

var Config Configuration

Config is the loaded configuration entity.

func (*Configuration) LoadConfiguration

func (c *Configuration) LoadConfiguration(configFile string)

LoadConfiguration loads a yaml file which sets fields for Configuration struct

type RunPlugin

type RunPlugin struct {
	Run  interface{}
	Name string
}

RunPlugin is a plugin to execute

Jump to

Keyboard shortcuts

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