Documentation
¶
Index ¶
- Constants
- type ActionDeclaration
- type ActionState
- type ActionTypeID
- type ApprovalResult
- type ArtifactRef
- type CodePipelineService
- func (s *CodePipelineService) Actions() []service.Action
- func (s *CodePipelineService) HandleRequest(ctx *service.RequestContext) (*service.Response, error)
- func (s *CodePipelineService) HealthCheck() error
- func (s *CodePipelineService) Name() string
- func (s *CodePipelineService) SetLocator(locator ServiceLocator)
- type Pipeline
- type PipelineExecution
- type ServiceLocator
- type ServiceLocatorForExec
- type StageDeclaration
- type StageState
- type Store
- func (s *Store) CreatePipeline(p *Pipeline) (*Pipeline, *service.AWSError)
- func (s *Store) DeletePipeline(name string) *service.AWSError
- func (s *Store) DeleteWebhook(name string) *service.AWSError
- func (s *Store) GetPipeline(name string) (*Pipeline, *service.AWSError)
- func (s *Store) GetPipelineExecution(pipelineName, executionID string) (*PipelineExecution, *service.AWSError)
- func (s *Store) GetPipelineState(pipelineName string) (*Pipeline, []*PipelineExecution, *service.AWSError)
- func (s *Store) ListPipelineExecutions(pipelineName string) ([]*PipelineExecution, *service.AWSError)
- func (s *Store) ListPipelines() []*Pipeline
- func (s *Store) ListTagsForResource(arn string) map[string]string
- func (s *Store) ListWebhooks() []*Webhook
- func (s *Store) PutApprovalResult(pipelineName, stageName, actionName string, result ApprovalResult) *service.AWSError
- func (s *Store) PutWebhook(name, pipelineName, targetAction, authentication string, ...) (*Webhook, *service.AWSError)
- func (s *Store) RetryStageExecution(pipelineName, stageName, executionID string) (*PipelineExecution, *service.AWSError)
- func (s *Store) StartPipelineExecution(pipelineName string) (*PipelineExecution, *service.AWSError)
- func (s *Store) StopPipelineExecution(pipelineName, executionID, reason string, abandon bool) (*PipelineExecution, *service.AWSError)
- func (s *Store) TagResource(arn string, tags map[string]string) *service.AWSError
- func (s *Store) UntagResource(arn string, keys []string) *service.AWSError
- func (s *Store) UpdatePipeline(p *Pipeline) (*Pipeline, *service.AWSError)
- type Webhook
- type WebhookFilter
Constants ¶
const ( ExecStatusInProgress = "InProgress" ExecStatusSucceeded = "Succeeded" ExecStatusFailed = "Failed" ExecStatusStopping = "Stopping" ExecStatusStopped = "Stopped" ExecStatusSuperseded = "Superseded" )
Pipeline execution status constants.
const ( ActionStatusInProgress = "InProgress" ActionStatusSucceeded = "Succeeded" ActionStatusFailed = "Failed" )
Stage action status constants.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionDeclaration ¶
type ActionDeclaration struct {
Name string
ActionTypeID ActionTypeID
Configuration map[string]string
InputArtifacts []ArtifactRef
OutputArtifacts []ArtifactRef
RunOrder int
}
ActionDeclaration describes an action within a stage.
type ActionState ¶
ActionState tracks the state of an action in a stage.
type ActionTypeID ¶
ActionTypeID identifies the type of an action.
type ApprovalResult ¶
ApprovalResult holds the result of a manual approval action.
type ArtifactRef ¶
type ArtifactRef struct {
Name string
}
ArtifactRef is a named artifact reference.
type CodePipelineService ¶
type CodePipelineService struct {
// contains filtered or unexported fields
}
CodePipelineService is the cloudmock implementation of the AWS CodePipeline API.
func New ¶
func New(accountID, region string) *CodePipelineService
New returns a new CodePipelineService for the given AWS account ID and region.
func NewWithLocator ¶
func NewWithLocator(accountID, region string, locator ServiceLocator) *CodePipelineService
NewWithLocator returns a new CodePipelineService with a ServiceLocator.
func (*CodePipelineService) Actions ¶
func (s *CodePipelineService) Actions() []service.Action
Actions returns the list of CodePipeline API actions supported.
func (*CodePipelineService) HandleRequest ¶
func (s *CodePipelineService) HandleRequest(ctx *service.RequestContext) (*service.Response, error)
HandleRequest routes an incoming CodePipeline request to the appropriate handler.
func (*CodePipelineService) HealthCheck ¶
func (s *CodePipelineService) HealthCheck() error
HealthCheck always returns nil.
func (*CodePipelineService) Name ¶
func (s *CodePipelineService) Name() string
Name returns the AWS service name used for routing.
func (*CodePipelineService) SetLocator ¶
func (s *CodePipelineService) SetLocator(locator ServiceLocator)
SetLocator sets the service locator for cross-service calls.
type Pipeline ¶
type Pipeline struct {
Name string
ARN string
RoleARN string
Version int
Stages []StageDeclaration
Tags map[string]string
CreatedAt time.Time
UpdatedAt time.Time
}
Pipeline represents a CodePipeline pipeline.
type PipelineExecution ¶
type PipelineExecution struct {
ID string
PipelineName string
PipelineVersion int
Status string
StatusSummary string
StartTime time.Time
EndTime *time.Time
StageStates []StageState
// contains filtered or unexported fields
}
PipelineExecution represents a single execution of a pipeline.
type ServiceLocator ¶
ServiceLocator resolves other services for cross-service integration.
type ServiceLocatorForExec ¶
ServiceLocatorForExec is the interface used by the executor to call other services.
type StageDeclaration ¶
type StageDeclaration struct {
Name string
Actions []ActionDeclaration
}
StageDeclaration describes a pipeline stage.
type StageState ¶
type StageState struct {
StageName string
ActionStates []ActionState
Status string
}
StageState tracks the state of a stage in an execution.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is the in-memory store for all CodePipeline resources.
func (*Store) CreatePipeline ¶
func (*Store) GetPipelineExecution ¶
func (s *Store) GetPipelineExecution(pipelineName, executionID string) (*PipelineExecution, *service.AWSError)
func (*Store) GetPipelineState ¶
func (*Store) ListPipelineExecutions ¶
func (s *Store) ListPipelineExecutions(pipelineName string) ([]*PipelineExecution, *service.AWSError)
func (*Store) ListPipelines ¶
func (*Store) ListTagsForResource ¶
func (*Store) ListWebhooks ¶
func (*Store) PutApprovalResult ¶
func (s *Store) PutApprovalResult(pipelineName, stageName, actionName string, result ApprovalResult) *service.AWSError
func (*Store) PutWebhook ¶
func (*Store) RetryStageExecution ¶
func (s *Store) RetryStageExecution(pipelineName, stageName, executionID string) (*PipelineExecution, *service.AWSError)
func (*Store) StartPipelineExecution ¶
func (s *Store) StartPipelineExecution(pipelineName string) (*PipelineExecution, *service.AWSError)
func (*Store) StopPipelineExecution ¶
func (*Store) TagResource ¶
func (*Store) UntagResource ¶
type Webhook ¶
type Webhook struct {
Name string
ARN string
PipelineName string
TargetAction string
TargetPipeline string
Authentication string
Filters []WebhookFilter
URL string
Tags map[string]string
CreatedAt time.Time
}
Webhook represents a CodePipeline webhook.
type WebhookFilter ¶
WebhookFilter defines a filter condition for a webhook.