Documentation ¶
Index ¶
- Variables
- func DeployHandler(m *Map)
- func Exports(session *session.Session) error
- func FetchSource(src string, rcv SourceReceiver) error
- func Git(r *repo.Repo)
- func TailService(tail <-chan *TailServiceInput)
- func TerminateHandler(m *Map)
- func Wait(getStatus func(s ...string) (string, error), args ...string) error
- type Config
- func (c *Config) CallFunctions(fmap template.FuncMap) error
- func (c *Config) GetSession() *session.Session
- func (c *Config) GetSource(src Source) (err error)
- func (c *Config) PackageToS3(packageFlag bool) (err error)
- func (c *Config) Parameters(s *Stack) *Config
- func (c *Config) Tags(s *Stack) *Config
- func (c *Config) Vars() map[string]interface{}
- type FileSource
- type HTTPSource
- type LambdaSource
- type Map
- type S3Source
- type Source
- type SourceReceiver
- type Stack
- func (s *Stack) Change(req, changename string) error
- func (s *Stack) ChangeSetStatus(args ...string) (string, error)
- func (s *Stack) Check() error
- func (s *Stack) Deploy() error
- func (s *Stack) DeploySAM() error
- func (s *Stack) DeployTimeParser() error
- func (s *Stack) GenTimeParser() error
- func (s *Stack) GetSession() *session.Session
- func (s *Stack) GetSource(src Source) (err error)
- func (s *Stack) Outputs() error
- func (s *Stack) Protect(enable *bool) error
- func (s *Stack) SetStackName()
- func (s *Stack) StackExists() bool
- func (s *Stack) StackPolicy() error
- func (s *Stack) StackStatus(args ...string) (string, error)
- func (s *Stack) State() (string, error)
- func (s *Stack) Status() error
- func (s *Stack) Update() error
- type TailServiceInput
Constants ¶
This section is empty.
Variables ¶
var (
// OutputRegex for printing yaml/json output
OutputRegex = `(?m)^[ -]*([^\r\n:]+?)\s*:[ \n\r\s]`
)
Functions ¶
func DeployHandler ¶
func DeployHandler(m *Map)
DeployHandler - Handles deploying stacks in the corrcet order TODO - this is still a fairly convoluted function... need to splify
func FetchSource ¶
func FetchSource(src string, rcv SourceReceiver) error
FetchSource - uses interfaces to initiate source retreival
func TailService ¶
func TailService(tail <-chan *TailServiceInput)
TailService - handles all tailing events
func TerminateHandler ¶
func TerminateHandler(m *Map)
TerminateHandler - Handles terminating stacks in the correct order
Types ¶
type Config ¶
type Config struct { Session *session.Session `yaml:"-" json:"" hcl:""` String string `yaml:"-" json:"-" hcl:"-"` Region string `yaml:"region,omitempty" json:"region,omitempty" hcl:"region,omitempty"` Project string `yaml:"project" json:"project" hcl:"project"` GenerateDelimiter string `yaml:"gen_time,omitempty" json:"gen_time,omitempty" hcl:"gen_time,omitempty"` DeployDelimiter string `yaml:"deploy_time,omitempty" json:"deploy_time,omitempty" hcl:"deploy_time,omitempty"` S3Package map[string]struct { Source string `yaml:"source,omitempty" json:"source,omitempty" hcl:"source,omitempty"` Destination string `yaml:"destination,omitempty" json:"destination,omitempty" hcl:"destination,omitempty"` } `yaml:"s3_package,omitempty" json:"s3_package,omitempty" hcl:"s3_package,omitempty"` Global map[string]interface{} `yaml:"global,omitempty" json:"global,omitempty" hcl:"global,omitempty"` Stacks map[string]struct { DependsOn []string `yaml:"depends_on,omitempty" json:"depends_on,omitempty" hcl:"depends_on,omitempty"` Parameters []map[string]string `yaml:"parameters,omitempty" json:"parameters,omitempty" hcl:"parameters,omitempty"` Policy string `yaml:"policy,omitempty" json:"policy,omitempty" hcl:"policy,omitempty"` Profile string `yaml:"profile,omitempty" json:"profile,omitempty" hcl:"profile,omitempty"` Region string `yaml:"region,omitempty" json:"region,omitempty" hcl:"region,omitempty"` Source string `yaml:"source,omitempty" json:"source,omitempty" hcl:"source,omitempty"` Name string `yaml:"name,omitempty" json:"name,omitempty" hcl:"name,omitempty"` Bucket string `yaml:"bucket,omitempty" json:"bucket,omitempty" hcl:"bucket,omitempty"` Role string `yaml:"role,omitempty" json:"role,omitempty" hcl:"role,omitempty"` Tags []map[string]string `yaml:"tags,omitempty" json:"tags,omitempty" hcl:"tags,omitempty"` Timeout int64 `yaml:"timeout,omitempty" json:"timeout,omitempty" hcl:"timeout,omitempty"` NotificationARNs []string `yaml:"notification-arns" json:"notification-arns" hcl:"notification-arns"` CFRoleArn string `yaml:"cf-role-arn" json:"cf-role-arn" hcl:"cf-role-arn"` CF map[string]interface{} `yaml:"cf,omitempty" json:"cf,omitempty" hcl:"cf,omitempty"` } `yaml:"stacks" json:"stacks" hcl:"stacks"` }
Config type for handling yaml config files
func (*Config) CallFunctions ¶
CallFunctions - execute gentime/deploytime functions in config
func (*Config) GetSession ¶
GetSession - Returns session to use in all source operations
func (*Config) PackageToS3 ¶ added in v0.82.1
PackageToS3 - executes package to s3 if --package/-p flag is given and packages are defined.
func (*Config) Parameters ¶
Parameters - Adds parameters to given stack based on config
type FileSource ¶
type FileSource struct {
Src string
}
FileSource - interface type NOTE: file is assumed if no other type if matched
func (FileSource) Handle ¶
func (f FileSource) Handle() (resp string, err error)
Handle - Source Handle
type LambdaSource ¶
LambdaSource - lambda source handle
type Map ¶
Map type
func (*Map) AddFuncs ¶ added in v0.82.1
AddFuncs - add stack map functions to function map Note: this only exists for deploytime/gentime functions that require access to stack data at runtime.
func (*Map) MustGet ¶
MustGet - assumes stack exists at the given Key returns value without validation
func (*Map) Range ¶
Range - iterate over map and execute function against each k, v pair. iteration ends if function returns false
func (*Map) StackOutput ¶
StackOutput - stack output reader for template function
type SourceReceiver ¶
type SourceReceiver interface { // SourceReceiver uses GetSource to call source and // apply results GetSource(Source) error // SourceReceivers may require sessions if calling aws resources // like Lambda & S3 GetSession() *session.Session }
SourceReceiver - interface for all items that require multisource functionality
type Stack ¶
type Stack struct { // Project name for stack Project *string // local logical stack name Name string // AWS stack name on build Stackname string // Stack template for generating CF Template string // list of Dependencies DependsOn []string Dependents []interface{} Stackoutputs *cloudformation.DescribeStacksOutput Parameters []*cloudformation.Parameter Output *cloudformation.DescribeStacksOutput Policy string Tags []*cloudformation.Tag Session *session.Session Profile string Region string Source string Bucket string Role string Rollback bool GenTimeFunc *template.FuncMap DeployTimeFunc *template.FuncMap DeployDelims *string GenDelims *string TemplateValues map[string]interface{} // Cloudformation Role CFRoleARN string // Debug value // Debug bool Timeout int64 // Actioned in this context means the stack name // has been passed explicitly as an arguement and // should be processed Actioned bool // list of SNS notification ARNs NotificationARNs []string }
Stack - holds all meaningful information about a particular stack.
func (*Stack) ChangeSetStatus ¶
ChangeSetStatus - returns the literal change-set status
func (*Stack) DeployTimeParser ¶
DeployTimeParser - Parses templates during deployment to resolve specfic Dependency functions like stackout...
func (*Stack) GenTimeParser ¶
GenTimeParser - Parses templates before deploying them...
func (*Stack) GetSession ¶
GetSession - Returns session to use in all source operations
func (*Stack) SetStackName ¶
func (s *Stack) SetStackName()
SetStackName - sets the.Stackname with struct
func (*Stack) StackExists ¶
StackExists - Returns true if stack exists in AWS Account, returns false if err when checking
func (*Stack) StackPolicy ¶
StackPolicy - Stack Cloudformation Stack policy
func (*Stack) StackStatus ¶
StackStatus - return the literal stack status
type TailServiceInput ¶
type TailServiceInput struct {
// contains filtered or unexported fields
}
TailServiceInput used for tailing cloudfomation outputs