Documentation ¶
Index ¶
- type CloudWatchEventsModel
- type CloudWatchEventsModelAPI
- type CodeBuildModel
- func (CodeBuildModel *CodeBuildModel) AdaptCodeBildJobForDelete(event types.Event) error
- func (CodeBuildModel *CodeBuildModel) AdaptCodeBildJobForUpdate(event types.Event) error
- func (CodeBuildModel *CodeBuildModel) CreateCodeBuildJob(event types.Event) error
- func (CodeBuildModel *CodeBuildModel) DeleteCodeBuildJob(event types.Event) error
- func (CodeBuildModel *CodeBuildModel) TriggerCodeBuild(event types.Event) error
- type CodeBuildModelAPI
- type DynamoDBModel
- func (DynamoDBModel *DynamoDBModel) DeleteEnvironment(event types.Event) error
- func (DynamoDBModel *DynamoDBModel) GetStatusForEnvironment(event types.Event, status *types.Status) error
- func (DynamoDBModel *DynamoDBModel) SetStatusAfterCreation(event types.Event) error
- func (DynamoDBModel *DynamoDBModel) SetStatusAfterDeletion(event types.Event) error
- func (DynamoDBModel *DynamoDBModel) SetStatusAfterUpdate(event types.Event) error
- func (DynamoDBModel *DynamoDBModel) SetStatusForEnvironment(event types.Event, status string) error
- type DynamoDBModelAPI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudWatchEventsModel ¶
type CloudWatchEventsModel struct {
cloudwatcheventsiface.CloudWatchEventsAPI
}
CloudWatchEventsModel is a struct including the AWS SDK CloudWatchEvents interface, all CloudWatchEvents model functions are called on this struct and the included AWS SDK CloudWatchEvents service
func NewCloudWatchEventsModel ¶
func NewCloudWatchEventsModel(svc cloudwatcheventsiface.CloudWatchEventsAPI) *CloudWatchEventsModel
NewCloudWatchEventsModel takes the AWS SDK CloudWatchEvents interface as parameter and returns the pointer to an CloudWatchEventsModel struct, on which all CloudWatchEvents model functions can be called
func (*CloudWatchEventsModel) DeleteCloudWatchEvents ¶
func (CloudWatchEventsModel *CloudWatchEventsModel) DeleteCloudWatchEvents(event types.Event) error
DeleteCloudWatchEvents removes the CloudWatchEvents rules (startup and shutdown schedules) for the Environment defined in event. If an error occurs the error gets logged and the returned.
func (*CloudWatchEventsModel) UpdateCloudWatchEvents ¶
func (CloudWatchEventsModel *CloudWatchEventsModel) UpdateCloudWatchEvents(event types.Event) error
UpdateCloudWatchEvents removes all existing CloudWatchEvents rules for the Environment and creates new shutdown and startup schedules according to the Environment configuration. This function is called by the controller. If an error occurs the error gets logged and the returned.
type CloudWatchEventsModelAPI ¶
type CloudWatchEventsModelAPI interface { UpdateCloudWatchEvents(event types.Event) error DeleteCloudWatchEvents(event types.Event) error }
CloudWatchEventsModelAPI is an interface including all CloudWatchEvents model functions
type CodeBuildModel ¶
type CodeBuildModel struct {
codebuildiface.CodeBuildAPI
}
CodeBuildModel is a struct including the AWS SDK CodeBuild interface, all CodeBuild model functions are called on this struct and the included AWS SDK CodeBuild service
func NewCodeBuildModel ¶
func NewCodeBuildModel(svc codebuildiface.CodeBuildAPI) *CodeBuildModel
NewCodeBuildModel takes the AWS SDK CodeBuild interface as parameter and returns the pointer to an CodeBuildModel struct, on which all CodeBuild model functions can be called
func (*CodeBuildModel) AdaptCodeBildJobForDelete ¶
func (CodeBuildModel *CodeBuildModel) AdaptCodeBildJobForDelete(event types.Event) error
AdaptCodeBildJobForDelete adapts the CodeBuild buildspec to delete an Environment infrastructure. If an error occurs the error gets logged and the returned.
func (*CodeBuildModel) AdaptCodeBildJobForUpdate ¶
func (CodeBuildModel *CodeBuildModel) AdaptCodeBildJobForUpdate(event types.Event) error
AdaptCodeBildJobForUpdate adapts the CodeBuild Job and buildspec with the updated Environment configuration (EnvironmentVariables). If an error occurs the error gets logged and the returned.
func (*CodeBuildModel) CreateCodeBuildJob ¶
func (CodeBuildModel *CodeBuildModel) CreateCodeBuildJob(event types.Event) error
CreateCodeBuildJob creates the CodebuildJob via AWS SDK with the configuration defined for the Environment. If an error occurs the error gets logged and the returned.
func (*CodeBuildModel) DeleteCodeBuildJob ¶
func (CodeBuildModel *CodeBuildModel) DeleteCodeBuildJob(event types.Event) error
DeleteCodeBuildJob removes the CodeBuild Job for the Environment specified in the Event struct. If an error occurs the error gets logged and the returned.
func (*CodeBuildModel) TriggerCodeBuild ¶
func (CodeBuildModel *CodeBuildModel) TriggerCodeBuild(event types.Event) error
TriggerCodeBuild starts the CodeBuild Job for the Environment specified in Event struct. If an error occurs the error gets logged and the returned.
type CodeBuildModelAPI ¶
type CodeBuildModelAPI interface { CreateCodeBuildJob(event types.Event) error DeleteCodeBuildJob(event types.Event) error AdaptCodeBildJobForDelete(event types.Event) error TriggerCodeBuild(event types.Event) error AdaptCodeBildJobForUpdate(event types.Event) error }
CodeBuildModelAPI is an interface including all CodeBuild model functions
type DynamoDBModel ¶
type DynamoDBModel struct {
dynamodbiface.DynamoDBAPI
}
DynamoDBModel is a struct including the AWS SDK DynamoDB interface, all DynamoDB model functions are called on this struct and the included AWS SDK DynamoDB service
func NewDynamoDBModel ¶
func NewDynamoDBModel(svc dynamodbiface.DynamoDBAPI) *DynamoDBModel
NewDynamoDBModel takes the AWS SDK DynamoDB interface as parameter and returns the pointer to an DynamoDBModel struct, on which all DynamoDB model functions can be called
func (*DynamoDBModel) DeleteEnvironment ¶
func (DynamoDBModel *DynamoDBModel) DeleteEnvironment(event types.Event) error
DeleteEnvironment removes an Environment specified in the Event struct from DynamoDB. If an error occurs the error gets logged and the returned.
func (*DynamoDBModel) GetStatusForEnvironment ¶
func (DynamoDBModel *DynamoDBModel) GetStatusForEnvironment(event types.Event, status *types.Status) error
GetStatusForEnvironment gets the status for an Environment specified in the Event struct from DynamoDB. If an error occurs the error gets logged and the returned.
func (*DynamoDBModel) SetStatusAfterCreation ¶
func (DynamoDBModel *DynamoDBModel) SetStatusAfterCreation(event types.Event) error
SetStatusAfterCreation checks the success variable in the event struct, which gets set in the CodeBuild Job. If success euqals 1 then the status gets set to "running" otherwise it gets set to "initating failed". If an error occurs the error gets logged and the returned.
func (*DynamoDBModel) SetStatusAfterDeletion ¶
func (DynamoDBModel *DynamoDBModel) SetStatusAfterDeletion(event types.Event) error
SetStatusAfterDeletion checks the success variable in the event struct, which gets set in the CodeBuild Job. If success euqals 1 then the status gets set to "destroyed" otherwise it gets set to "destroying failed". If an error occurs the error gets logged and the returned.
func (*DynamoDBModel) SetStatusAfterUpdate ¶
func (DynamoDBModel *DynamoDBModel) SetStatusAfterUpdate(event types.Event) error
SetStatusAfterUpdate checks the success variable in the event struct, which gets set in the CodeBuild Job. If success euqals 1 then the status gets set to "running" otherwise it gets set to "updating failed". If an error occurs the error gets logged and the returned.
func (*DynamoDBModel) SetStatusForEnvironment ¶
func (DynamoDBModel *DynamoDBModel) SetStatusForEnvironment(event types.Event, status string) error
SetStatusForEnvironment updates the status of an environment (which gets identified by branch and repository from the event parameter) in DynamoDB with the status given as parameter
type DynamoDBModelAPI ¶
type DynamoDBModelAPI interface { SetStatusAfterCreation(event types.Event) error SetStatusAfterDeletion(event types.Event) error DeleteEnvironment(event types.Event) error GetStatusForEnvironment(event types.Event, status *types.Status) error SetStatusForEnvironment(event types.Event, status string) error SetStatusAfterUpdate(event types.Event) error }
DynamoDBModelAPI is an interface including all DynamoDB model functions