Documentation
¶
Index ¶
- Constants
- type Application
- type CodeDeployService
- func (s *CodeDeployService) Actions() []service.Action
- func (s *CodeDeployService) HandleRequest(ctx *service.RequestContext) (*service.Response, error)
- func (s *CodeDeployService) HealthCheck() error
- func (s *CodeDeployService) Name() string
- func (s *CodeDeployService) SetLocator(locator ServiceLocator)
- type Deployment
- type DeploymentConfig
- type DeploymentGroup
- type DeploymentStyle
- type DeploymentTarget
- type EC2TagFilter
- type GitHubLocation
- type InstanceTarget
- type LifecycleEvent
- type MinimumHealthyHosts
- type RevisionLocation
- type S3Location
- type ServiceLocator
- type Store
- func (s *Store) AddTagsToOnPremisesInstances(instanceNames []string, tags map[string]string) *service.AWSError
- func (s *Store) BatchGetDeploymentTargets(deploymentID string, targetIDs []string) ([]*DeploymentTarget, *service.AWSError)
- func (s *Store) BatchGetDeployments(ids []string) ([]*Deployment, *service.AWSError)
- func (s *Store) CreateApplication(name, computePlatform string, tags map[string]string) (*Application, *service.AWSError)
- func (s *Store) CreateDeployment(appName, groupName, configName, description string, revision RevisionLocation) (*Deployment, *service.AWSError)
- func (s *Store) CreateDeploymentConfig(name, computePlatform string, minimumHealthyHosts *MinimumHealthyHosts, ...) (*DeploymentConfig, *service.AWSError)
- func (s *Store) CreateDeploymentGroup(appName string, group *DeploymentGroup) (*DeploymentGroup, *service.AWSError)
- func (s *Store) DeleteApplication(name string) *service.AWSError
- func (s *Store) DeleteDeploymentConfig(name string) *service.AWSError
- func (s *Store) DeleteDeploymentGroup(appName, groupName string) *service.AWSError
- func (s *Store) GetApplication(name string) (*Application, *service.AWSError)
- func (s *Store) GetDeployment(deploymentID string) (*Deployment, *service.AWSError)
- func (s *Store) GetDeploymentConfig(name string) (*DeploymentConfig, *service.AWSError)
- func (s *Store) GetDeploymentGroup(appName, groupName string) (*DeploymentGroup, *service.AWSError)
- func (s *Store) ListApplications() []string
- func (s *Store) ListDeploymentConfigs() []string
- func (s *Store) ListDeploymentGroups(appName string) ([]string, *service.AWSError)
- func (s *Store) ListDeployments(appName, groupName, status string) []string
- func (s *Store) RemoveTagsFromOnPremisesInstances(instanceNames []string, tagKeys []string) *service.AWSError
- func (s *Store) StopDeployment(deploymentID string) (*Deployment, *service.AWSError)
- func (s *Store) UpdateApplication(oldName, newName string) *service.AWSError
- func (s *Store) UpdateDeploymentGroup(appName, groupName string, updates map[string]any) (*DeploymentGroup, *service.AWSError)
- type TimeBasedCanary
- type TimeBasedLinear
- type TrafficRoutingConfig
Constants ¶
const ( DeployStatusCreated = "Created" DeployStatusInProgress = "InProgress" DeployStatusSucceeded = "Succeeded" DeployStatusFailed = "Failed" DeployStatusStopped = "Stopped" )
Deployment status constants.
const ( InstanceStatusPending = "Pending" InstanceStatusInProgress = "InProgress" InstanceStatusSucceeded = "Succeeded" InstanceStatusFailed = "Failed" InstanceStatusSkipped = "Skipped" )
InstanceDeploymentStatus constants for per-instance lifecycle.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
ID string
Name string
ARN string
ComputePlatform string
CreatedAt time.Time
Tags map[string]string
}
Application represents a CodeDeploy application.
type CodeDeployService ¶
type CodeDeployService struct {
// contains filtered or unexported fields
}
CodeDeployService is the cloudmock implementation of the AWS CodeDeploy API.
func New ¶
func New(accountID, region string) *CodeDeployService
New returns a new CodeDeployService for the given AWS account ID and region.
func NewWithLocator ¶
func NewWithLocator(accountID, region string, locator ServiceLocator) *CodeDeployService
NewWithLocator returns a new CodeDeployService with a ServiceLocator.
func (*CodeDeployService) Actions ¶
func (s *CodeDeployService) Actions() []service.Action
Actions returns the list of CodeDeploy API actions supported.
func (*CodeDeployService) HandleRequest ¶
func (s *CodeDeployService) HandleRequest(ctx *service.RequestContext) (*service.Response, error)
HandleRequest routes an incoming CodeDeploy request to the appropriate handler.
func (*CodeDeployService) HealthCheck ¶
func (s *CodeDeployService) HealthCheck() error
HealthCheck always returns nil.
func (*CodeDeployService) Name ¶
func (s *CodeDeployService) Name() string
Name returns the AWS service name used for routing.
func (*CodeDeployService) SetLocator ¶
func (s *CodeDeployService) SetLocator(locator ServiceLocator)
SetLocator sets the service locator for cross-service calls.
type Deployment ¶
type Deployment struct {
ID string
ARN string
ApplicationName string
DeploymentGroupName string
DeploymentConfigName string
Revision RevisionLocation
Status string
Description string
Creator string
CreateTime time.Time
StartTime *time.Time
CompleteTime *time.Time
Targets []*InstanceTarget
// contains filtered or unexported fields
}
Deployment represents a single deployment.
type DeploymentConfig ¶
type DeploymentConfig struct {
Name string
ARN string
ComputePlatform string
MinimumHealthyHosts *MinimumHealthyHosts
TrafficRoutingConfig *TrafficRoutingConfig
CreatedAt time.Time
IsBuiltIn bool
}
DeploymentConfig represents a CodeDeploy deployment configuration.
type DeploymentGroup ¶
type DeploymentGroup struct {
ID string
Name string
ARN string
ApplicationName string
DeploymentConfigName string
ServiceRoleARN string
AutoScalingGroups []string
Ec2TagFilters []EC2TagFilter
DeploymentStyle DeploymentStyle
CreatedAt time.Time
Tags map[string]string
}
DeploymentGroup represents a CodeDeploy deployment group.
type DeploymentStyle ¶
DeploymentStyle describes the deployment strategy.
type DeploymentTarget ¶
type DeploymentTarget struct {
DeploymentTargetType string
InstanceTarget *InstanceTarget
}
DeploymentTarget represents a deployment target instance.
type EC2TagFilter ¶
EC2TagFilter is a tag filter for EC2 instances.
type GitHubLocation ¶
GitHubLocation describes a GitHub revision location.
type InstanceTarget ¶
type InstanceTarget struct {
DeploymentID string
TargetID string
TargetARN string
Status string
LastUpdatedAt time.Time
LifecycleEvents []LifecycleEvent
}
InstanceTarget describes a deployment to an EC2 instance.
type LifecycleEvent ¶
type LifecycleEvent struct {
LifecycleEventName string
Status string
StartTime time.Time
EndTime *time.Time
}
LifecycleEvent represents a deployment lifecycle hook event.
type MinimumHealthyHosts ¶
MinimumHealthyHosts specifies the minimum number of healthy instances.
type RevisionLocation ¶
type RevisionLocation struct {
RevisionType string
S3Location *S3Location
GitHubLocation *GitHubLocation
}
RevisionLocation describes the deployment revision source.
type S3Location ¶
S3Location describes an S3 revision location.
type ServiceLocator ¶
ServiceLocator resolves other services for cross-service integration.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is the in-memory store for all CodeDeploy resources.
func (*Store) AddTagsToOnPremisesInstances ¶
func (*Store) BatchGetDeploymentTargets ¶
func (*Store) BatchGetDeployments ¶
func (s *Store) BatchGetDeployments(ids []string) ([]*Deployment, *service.AWSError)
func (*Store) CreateApplication ¶
func (*Store) CreateDeployment ¶
func (s *Store) CreateDeployment(appName, groupName, configName, description string, revision RevisionLocation) (*Deployment, *service.AWSError)
func (*Store) CreateDeploymentConfig ¶
func (s *Store) CreateDeploymentConfig(name, computePlatform string, minimumHealthyHosts *MinimumHealthyHosts, trafficRouting *TrafficRoutingConfig) (*DeploymentConfig, *service.AWSError)
func (*Store) CreateDeploymentGroup ¶
func (s *Store) CreateDeploymentGroup(appName string, group *DeploymentGroup) (*DeploymentGroup, *service.AWSError)
func (*Store) DeleteDeploymentConfig ¶
func (*Store) DeleteDeploymentGroup ¶
func (*Store) GetApplication ¶
func (s *Store) GetApplication(name string) (*Application, *service.AWSError)
func (*Store) GetDeployment ¶
func (s *Store) GetDeployment(deploymentID string) (*Deployment, *service.AWSError)
func (*Store) GetDeploymentConfig ¶
func (s *Store) GetDeploymentConfig(name string) (*DeploymentConfig, *service.AWSError)
func (*Store) GetDeploymentGroup ¶
func (s *Store) GetDeploymentGroup(appName, groupName string) (*DeploymentGroup, *service.AWSError)
func (*Store) ListApplications ¶
func (*Store) ListDeploymentConfigs ¶
func (*Store) ListDeploymentGroups ¶
func (*Store) ListDeployments ¶
func (*Store) RemoveTagsFromOnPremisesInstances ¶
func (*Store) StopDeployment ¶
func (s *Store) StopDeployment(deploymentID string) (*Deployment, *service.AWSError)
func (*Store) UpdateApplication ¶
func (*Store) UpdateDeploymentGroup ¶
type TimeBasedCanary ¶
TimeBasedCanary specifies canary deployment config.
type TimeBasedLinear ¶
TimeBasedLinear specifies linear deployment config.
type TrafficRoutingConfig ¶
type TrafficRoutingConfig struct {
Type string
TimeBasedCanary *TimeBasedCanary
TimeBasedLinear *TimeBasedLinear
}
TrafficRoutingConfig specifies traffic routing for a deployment.