codepipeline

package
v1.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExecStatusInProgress = "InProgress"
	ExecStatusSucceeded  = "Succeeded"
	ExecStatusFailed     = "Failed"
	ExecStatusStopping   = "Stopping"
	ExecStatusStopped    = "Stopped"
	ExecStatusSuperseded = "Superseded"
)

Pipeline execution status constants.

View Source
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

type ActionState struct {
	ActionName string
	Status     string
	Summary    string
	LastUpdate time.Time
}

ActionState tracks the state of an action in a stage.

type ActionTypeID

type ActionTypeID struct {
	Category string
	Owner    string
	Provider string
	Version  string
}

ActionTypeID identifies the type of an action.

type ApprovalResult

type ApprovalResult struct {
	Summary string
	Status  string // Approved | Rejected
}

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

type ServiceLocator interface {
	Lookup(name string) (service.Service, error)
}

ServiceLocator resolves other services for cross-service integration.

type ServiceLocatorForExec

type ServiceLocatorForExec interface {
	Lookup(name string) (service.Service, error)
}

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 NewStore

func NewStore(accountID, region string) *Store

NewStore creates an empty CodePipeline store.

func (*Store) CreatePipeline

func (s *Store) CreatePipeline(p *Pipeline) (*Pipeline, *service.AWSError)

func (*Store) DeletePipeline

func (s *Store) DeletePipeline(name string) *service.AWSError

func (*Store) DeleteWebhook

func (s *Store) DeleteWebhook(name string) *service.AWSError

func (*Store) GetPipeline

func (s *Store) GetPipeline(name string) (*Pipeline, *service.AWSError)

func (*Store) GetPipelineExecution

func (s *Store) GetPipelineExecution(pipelineName, executionID string) (*PipelineExecution, *service.AWSError)

func (*Store) GetPipelineState

func (s *Store) GetPipelineState(pipelineName string) (*Pipeline, []*PipelineExecution, *service.AWSError)

func (*Store) ListPipelineExecutions

func (s *Store) ListPipelineExecutions(pipelineName string) ([]*PipelineExecution, *service.AWSError)

func (*Store) ListPipelines

func (s *Store) ListPipelines() []*Pipeline

func (*Store) ListTagsForResource

func (s *Store) ListTagsForResource(arn string) map[string]string

func (*Store) ListWebhooks

func (s *Store) ListWebhooks() []*Webhook

func (*Store) PutApprovalResult

func (s *Store) PutApprovalResult(pipelineName, stageName, actionName string, result ApprovalResult) *service.AWSError

func (*Store) PutWebhook

func (s *Store) PutWebhook(name, pipelineName, targetAction, authentication string, filters []WebhookFilter, tags map[string]string) (*Webhook, *service.AWSError)

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 (s *Store) StopPipelineExecution(pipelineName, executionID, reason string, abandon bool) (*PipelineExecution, *service.AWSError)

func (*Store) TagResource

func (s *Store) TagResource(arn string, tags map[string]string) *service.AWSError

func (*Store) UntagResource

func (s *Store) UntagResource(arn string, keys []string) *service.AWSError

func (*Store) UpdatePipeline

func (s *Store) UpdatePipeline(p *Pipeline) (*Pipeline, *service.AWSError)

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

type WebhookFilter struct {
	JSONPath    string
	MatchEquals string
}

WebhookFilter defines a filter condition for a webhook.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL