Documentation ¶
Index ¶
- Constants
- Variables
- func GetOrElse(valueMap map[string]string, key string, defaultValue string) string
- type AbleToPrintUsageExample
- type CommandEnvironment
- func (t *CommandEnvironment) Get(key string) string
- func (t *CommandEnvironment) GetBoolOrElse(key string, defaultValue bool) bool
- func (t *CommandEnvironment) GetOrElse(key string, defaultValue string) string
- func (t *CommandEnvironment) GetValueMap() map[string]string
- func (t *CommandEnvironment) Set(key string, value string)
- func (t *CommandEnvironment) ToYamlString() string
- type DefaultDeploymentContext
- type Deployment
- type DeploymentContext
- type DeploymentImpl
- type DeploymentOutput
- type DeploymentOutputImpl
- type DeploymentStep
- type DeploymentStepFunc
- type DeploymentStepOutput
- type TemplateData
- type TemplateDataImpl
- func (t *TemplateDataImpl) AddEnv(key string, value string)
- func (t *TemplateDataImpl) AddEnvs(values map[string]string)
- func (t *TemplateDataImpl) AddValue(key string, value interface{})
- func (t *TemplateDataImpl) AddValueWithNestedKey(key string, value interface{})
- func (t *TemplateDataImpl) AddValues(values map[string]interface{})
- func (t *TemplateDataImpl) Env() map[string]string
- func (t *TemplateDataImpl) GetStringValueOrDefault(key string, defaultValue string) string
- func (t *TemplateDataImpl) NamePrefix() string
- func (t *TemplateDataImpl) Values() map[string]interface{}
- type TemplateDataWithRegion
- type Topology
- type TopologyHandler
- type TopologyHandlerManager
- type TopologyMetadata
Constants ¶
View Source
const ( TemplateNoValue = "<no value>" DefaultNamePrefix = "my" DefaultRegion = "us-west-1" )
View Source
const ( PunchTopologyTagName = "punch-topology" DefaultEKSAssumeRolePolicyDocument = `` /* 131-byte string literal not displayed */ DefaultEC2AssumeRolePolicyDocument = `` /* 131-byte string literal not displayed */ )
Variables ¶
View Source
var DefaultTopologyHandlerManager = TopologyHandlerManager{ // contains filtered or unexported fields }
Functions ¶
Types ¶
type AbleToPrintUsageExample ¶
type AbleToPrintUsageExample interface {
PrintUsageExample(topology Topology, deploymentOutput DeploymentOutput)
}
type CommandEnvironment ¶
type CommandEnvironment struct {
// contains filtered or unexported fields
}
func CreateCommandEnvironment ¶
func CreateCommandEnvironment(valueMap map[string]string) CommandEnvironment
func (*CommandEnvironment) Get ¶
func (t *CommandEnvironment) Get(key string) string
func (*CommandEnvironment) GetBoolOrElse ¶
func (t *CommandEnvironment) GetBoolOrElse(key string, defaultValue bool) bool
func (*CommandEnvironment) GetOrElse ¶
func (t *CommandEnvironment) GetOrElse(key string, defaultValue string) string
func (*CommandEnvironment) GetValueMap ¶
func (t *CommandEnvironment) GetValueMap() map[string]string
func (*CommandEnvironment) Set ¶
func (t *CommandEnvironment) Set(key string, value string)
func (*CommandEnvironment) ToYamlString ¶
func (t *CommandEnvironment) ToYamlString() string
type DefaultDeploymentContext ¶
type DefaultDeploymentContext struct {
// contains filtered or unexported fields
}
func (DefaultDeploymentContext) AddStepOutput ¶
func (d DefaultDeploymentContext) AddStepOutput(name string, output map[string]interface{})
func (DefaultDeploymentContext) GetStepOutput ¶
func (d DefaultDeploymentContext) GetStepOutput(name string) map[string]interface{}
type Deployment ¶
type Deployment interface { GetContext() DeploymentContext AddStep(name string, description string, run DeploymentStepFunc) RunSteps(topology Topology) error GetOutput() DeploymentOutput }
type DeploymentContext ¶
type DeploymentContext interface { AddStepOutput(name string, output map[string]interface{}) GetStepOutput(name string) map[string]interface{} }
func NewDefaultDeploymentContext ¶
func NewDefaultDeploymentContext() DeploymentContext
type DeploymentImpl ¶
type DeploymentImpl struct {
// contains filtered or unexported fields
}
func NewDeployment ¶
func NewDeployment() DeploymentImpl
func (*DeploymentImpl) AddStep ¶
func (d *DeploymentImpl) AddStep(name string, description string, run DeploymentStepFunc)
func (*DeploymentImpl) GetContext ¶
func (d *DeploymentImpl) GetContext() DeploymentContext
func (*DeploymentImpl) GetOutput ¶
func (d *DeploymentImpl) GetOutput() DeploymentOutput
func (*DeploymentImpl) RunSteps ¶
func (d *DeploymentImpl) RunSteps(topology Topology) error
type DeploymentOutput ¶
type DeploymentOutput interface { Steps() []string Output() map[string]DeploymentStepOutput }
type DeploymentOutputImpl ¶
type DeploymentOutputImpl struct {
// contains filtered or unexported fields
}
func (*DeploymentOutputImpl) Output ¶
func (t *DeploymentOutputImpl) Output() map[string]DeploymentStepOutput
func (*DeploymentOutputImpl) Steps ¶
func (t *DeploymentOutputImpl) Steps() []string
type DeploymentStep ¶
type DeploymentStep interface { Name() string Description() string Run(context DeploymentContext, topology Topology) (DeploymentStepOutput, error) }
type DeploymentStepFunc ¶
type DeploymentStepFunc func(context DeploymentContext, topology Topology) (DeploymentStepOutput, error)
type DeploymentStepOutput ¶
type DeploymentStepOutput map[string]interface{}
func NewDeploymentStepOutput ¶
func NewDeploymentStepOutput() DeploymentStepOutput
type TemplateData ¶
type TemplateDataImpl ¶
type TemplateDataImpl struct {
// contains filtered or unexported fields
}
func CopyTemplateData ¶
func CopyTemplateData(from TemplateData) TemplateDataImpl
func CreateTemplateData ¶
func CreateTemplateData(env map[string]string, values map[string]string) TemplateDataImpl
func (*TemplateDataImpl) AddEnv ¶
func (t *TemplateDataImpl) AddEnv(key string, value string)
func (*TemplateDataImpl) AddEnvs ¶
func (t *TemplateDataImpl) AddEnvs(values map[string]string)
func (*TemplateDataImpl) AddValue ¶
func (t *TemplateDataImpl) AddValue(key string, value interface{})
func (*TemplateDataImpl) AddValueWithNestedKey ¶
func (t *TemplateDataImpl) AddValueWithNestedKey(key string, value interface{})
func (*TemplateDataImpl) AddValues ¶
func (t *TemplateDataImpl) AddValues(values map[string]interface{})
func (*TemplateDataImpl) Env ¶
func (t *TemplateDataImpl) Env() map[string]string
func (*TemplateDataImpl) GetStringValueOrDefault ¶
func (t *TemplateDataImpl) GetStringValueOrDefault(key string, defaultValue string) string
func (*TemplateDataImpl) NamePrefix ¶
func (t *TemplateDataImpl) NamePrefix() string
func (*TemplateDataImpl) Values ¶
func (t *TemplateDataImpl) Values() map[string]interface{}
type TemplateDataWithRegion ¶
type TemplateDataWithRegion struct {
TemplateDataImpl
}
func (*TemplateDataWithRegion) DefaultS3BucketName ¶
func (t *TemplateDataWithRegion) DefaultS3BucketName() string
func (*TemplateDataWithRegion) DefaultVpcId ¶
func (t *TemplateDataWithRegion) DefaultVpcId() string
func (*TemplateDataWithRegion) Region ¶
func (t *TemplateDataWithRegion) Region() string
type TopologyHandler ¶
type TopologyHandler interface { Generate() (Topology, error) Parse(yamlContent []byte) (Topology, error) Resolve(topology Topology, data TemplateData) (Topology, error) Install(topology Topology) (DeploymentOutput, error) Uninstall(topology Topology) (DeploymentOutput, error) }
type TopologyHandlerManager ¶
type TopologyHandlerManager struct {
// contains filtered or unexported fields
}
func (TopologyHandlerManager) AddHandler ¶
func (t TopologyHandlerManager) AddHandler(kind string, handler TopologyHandler)
func (TopologyHandlerManager) GetHandler ¶
func (t TopologyHandlerManager) GetHandler(kind string) TopologyHandler
GetHandler returns nil on unsupported kind
Click to show internal directories.
Click to hide internal directories.