Documentation ¶
Index ¶
- func CloudAddExpGetAtt(tpl *gocf.Template, p Plugin, ref CloudRef, att CloudAtt)
- func CloudAddExpRef(tpl *gocf.Template, p Plugin, ref CloudRef)
- func CloudGetDefaultTags(name string) *[]gotags.Tag
- func CloudGetStackName(p Plugin) string
- func CloudGetTaskDefinitionKeyValuePairs(m map[string]string) *[]goecs.TaskDefinition_KeyValuePair
- func LocalGetContainerName(p Plugin, additionalParts ...string) string
- func NewAssumeRolePolicyDocument(service string) interface{}
- func NewPolicyDocument(statements ...*PolicyStatement) interface{}
- type App
- type AppConfig
- type CloudAtt
- type CloudExports
- type CloudRef
- type CloudStage
- type CloudStageConfig
- type LocalStage
- type LocalStageConfig
- type OtherDependencies
- type Plugin
- type PolicyStatement
- func (s *PolicyStatement) AddActions(actions ...string) *PolicyStatement
- func (s *PolicyStatement) AddResources(resources ...string) *PolicyStatement
- func (s *PolicyStatement) Build() interface{}
- func (s *PolicyStatement) SetAnyRootAccountPrincipal() *PolicyStatement
- func (s *PolicyStatement) SetCurrentRootAccountPrincipal() *PolicyStatement
- func (s *PolicyStatement) SetServicePrincipal(service string) *PolicyStatement
- func (s *PolicyStatement) SetWildcardPrincipal() *PolicyStatement
- type Stage
- type StageConfig
- type StageMode
- type StageTarget
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloudAddExpGetAtt ¶
CloudAddExpGetAtt adds a get attribute export to the given template.
func CloudAddExpRef ¶
CloudAddExpRef adds a reference export to the given template.
func CloudGetDefaultTags ¶
CloudGetDefaultTags returns a set of default tags.
func CloudGetStackName ¶
CloudGetStackName generates a stack name for the given plugin.
func CloudGetTaskDefinitionKeyValuePairs ¶
func CloudGetTaskDefinitionKeyValuePairs(m map[string]string) *[]goecs.TaskDefinition_KeyValuePair
CloudGetTaskDefinitionKeyValuePairs converts a map of strings to a slice of TaskDefinition_KeyValuePair.
func LocalGetContainerName ¶
LocalGetContainerName generates a container name for the given plugin.
func NewAssumeRolePolicyDocument ¶
func NewAssumeRolePolicyDocument(service string) interface{}
NewAssumeRolePolicyDocument generates a new assume role policy document.
func NewPolicyDocument ¶
func NewPolicyDocument(statements ...*PolicyStatement) interface{}
NewPolicyDocument generates a new policy document.
Types ¶
type App ¶
type App interface { GetConfig() *AppConfig GetBuildDirPath(p Plugin, additionalParts ...string) string GetConfigDirPath(p Plugin, additionalParts ...string) string GetOperations() toolz.Operations GetSortedPlugins() [][]Plugin }
App describes an App.
type AppConfig ¶
type AppConfig struct { DisplayName string `validate:"required"` Name string `validate:"required,resource-name"` ConfigDirPath string `validate:"required,dir"` BuildDirPath string `validate:"required,parent-dir"` AWSConfig *aws.Config `validate:"required"` Plugins []Plugin `validate:"required"` }
AppConfig describes the app config.
func (*AppConfig) MustValidate ¶
func (c *AppConfig) MustValidate()
MustValidate validates the app config.
type CloudExports ¶
type CloudExports interface { GetRef(ref CloudRef) string GetAtt(ref CloudRef, att CloudAtt) string }
CloudExports describes a set of cloud exports.
func NewCloudExports ¶
func NewCloudExports(stack *awscft.Stack) CloudExports
NewCloudExports initializes a new set of cloud exports.
type CloudRef ¶
type CloudRef string
CloudRef describes a cloud reference.
func (CloudRef) ExpAttName ¶
ExpAttName returns a name for an attribute export.
func (CloudRef) ExpRefName ¶
ExpRefName returns a name for a reference export.
type CloudStage ¶
type CloudStage interface { Stage GetCloudConfig() *CloudStageConfig GetArtifactsKeyPrefix(p Plugin, additionalParts ...string) string IsDeployed() bool }
CloudStage describes a cloud Stage.
func NewCloudStage ¶
func NewCloudStage(cfg *CloudStageConfig) CloudStage
NewCloudStage initializes a new CloudStage.
type CloudStageConfig ¶
type CloudStageConfig struct { *StageConfig `validate:"required"` Name string `validate:"required,resource-name"` Version string `validate:"required"` Mode StageMode `validate:"required,oneof=production|staging"` }
CloudStageConfig describes the Stage cloud config.
func (*CloudStageConfig) MustValidate ¶
func (c *CloudStageConfig) MustValidate()
MustValidate validates the cloud stage config.
type LocalStage ¶
type LocalStage interface { Stage GetLocalConfig() *LocalStageConfig GetServiceNetworkConfig() map[string]*dctypes.ServiceNetworkConfig }
LocalStage describes a local Stage.
func NewLocalStage ¶
func NewLocalStage(cfg *LocalStageConfig) LocalStage
NewLocalStage initializes a new LocalStage.
type LocalStageConfig ¶
type LocalStageConfig struct {
*StageConfig `validate:"required"`
}
LocalStageConfig describes the local Stage config.
func (*LocalStageConfig) MustValidate ¶
func (c *LocalStageConfig) MustValidate()
MustValidate validates the local stage config.
type OtherDependencies ¶
type OtherDependencies []Plugin
OtherDependencies describes a set of unstructured dependencies.
type Plugin ¶
type Plugin interface { GetDisplayName() string GetName() string GetInstanceName() *string // nil for singleton Plugins GetDependenciesMap() map[Plugin]struct{} Configure(stage Stage) GetStage() Stage IsDeployed() bool UpdateLocalTemplate(tpl *dctypes.Config, buildDirPath string) GetCloudTemplate(buildDirPath string) *gocf.Template UpdateCloudMetadata(stack *awscft.Stack) BeforeDeployHook(buildDirPath string) AfterDeployHook(buildDirPath string) }
Plugin describes a plugin, i.e. a set of behaviors, tools, and components.
type PolicyStatement ¶
PolicyStatement describes a policy statement.
func NewPolicyStatement ¶
func NewPolicyStatement() *PolicyStatement
NewPolicyStatement initializes a new PolicyStatement.
func (*PolicyStatement) AddActions ¶
func (s *PolicyStatement) AddActions(actions ...string) *PolicyStatement
AddActions adds actions to the policy statement.
func (*PolicyStatement) AddResources ¶
func (s *PolicyStatement) AddResources(resources ...string) *PolicyStatement
AddResources adds resources to the policy statement.
func (*PolicyStatement) Build ¶
func (s *PolicyStatement) Build() interface{}
Build builds the policy statement.
func (*PolicyStatement) SetAnyRootAccountPrincipal ¶
func (s *PolicyStatement) SetAnyRootAccountPrincipal() *PolicyStatement
SetAnyRootAccountPrincipal sets any root account as principal on the policy statement.
func (*PolicyStatement) SetCurrentRootAccountPrincipal ¶
func (s *PolicyStatement) SetCurrentRootAccountPrincipal() *PolicyStatement
SetCurrentRootAccountPrincipal sets the current root account as principal on the policy statement.
func (*PolicyStatement) SetServicePrincipal ¶
func (s *PolicyStatement) SetServicePrincipal(service string) *PolicyStatement
SetServicePrincipal sets a service as principal on the policy statement.
func (*PolicyStatement) SetWildcardPrincipal ¶
func (s *PolicyStatement) SetWildcardPrincipal() *PolicyStatement
SetWildcardPrincipal sets a wildcard as principal on the policy statement.
type Stage ¶
type Stage interface { GetName() string GetTarget() StageTarget GetMode() StageMode GetConfig() *StageConfig AsCloudStage() CloudStage AsLocalStage() LocalStage Deploy() }
Stage describes a Stage.
type StageConfig ¶
type StageConfig struct { App App `validate:"required"` CustomConfig interface{} }
StageConfig describes the common config for a stage.
type StageMode ¶
type StageMode string
StageMode describes a Stage mode.
func (StageMode) IsProduction ¶
IsProduction returns true if the Stage mode is Production.
func (StageMode) MustValidate ¶
func (s StageMode) MustValidate()
MustValidate validates the StageMode.
type StageTarget ¶
type StageTarget string
StageTarget describes a Stage target.
const ( Local StageTarget = "local" Cloud StageTarget = "cloud" )
Known Stage targets.
func (StageTarget) IsCloud ¶
func (s StageTarget) IsCloud() bool
IsCloud returns true if the Stage target is Cloud.
func (StageTarget) IsLocal ¶
func (s StageTarget) IsLocal() bool
IsLocal returns true if the Stage target is Local.
func (StageTarget) MustValidate ¶
func (s StageTarget) MustValidate()
MustValidate validates the StageTarget.
func (StageTarget) String ¶
func (s StageTarget) String() string
String implements the fmt.Stringer interface.