codepipeline

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 34 Imported by: 0

README

CodePipeline

Parity grade: A · SDK aws-sdk-go-v2/service/codepipeline@v1.54.0 · last audited 2026-10-12 (d4dc4a723)

Coverage

Metric Value
PARITY entries audited 22 (17 ok, 4 partial, 1 gap)
Feature families 6 (6 ok)
Known gaps 3
Structural gaps (can't be emulated) 7
Deferred items 1
Resource leaks clean
Known gaps
  • gopherstack-wlab (2026-09-08, reconfirmed 2026-09-18): CreateCustomActionType/DeleteCustomActionType/DeletePipeline/UpdatePipeline/OverrideStageCondition/RetryStageExecution/StopPipelineExecution each emit a wire error code (InvalidStructureException/ActionTypeNotFoundException/PipelineNotFoundException x2/PipelineExecutionNotFoundException x3) absent from that op's own declared set per botocore codepipeline/2015-07-09/service-2.json; every declared candidate's doc text was checked and none fits, and a real client's errors.As still resolves each to its own concrete type (undeclared_error_codes_test.go). The real code is not determinable from the SDK.
  • No AWS-documented derivation or evidence: ListRuleTypes omits RuleType.InputArtifactDetails (no documented per-provider min/max counts).
  • handleError's InvalidActionException (unknown-action routing fallback) names no type codepipeline@v1.49.4 declares; see the 2026-08-29 errcodeaudit note.
Structural gaps

These do not block an A grade — no implementation could produce real data here because the underlying data source cannot exist in an emulator.

  • Rule providers other than VariableCheck and LambdaInvoke (DeploymentWindow, CloudWatchAlarm, Commands) always Succeed: no wall-clock window, alarm backend or compute to consult.
  • ListActionTypes lists only custom action types; the AWS-owned and third-party built-in catalog (artifact details, settings) is AWS-owned reference data with no SDK source, so ActionOwnerFilter=AWS returns nothing.
  • JobData/ThirdPartyJobData omit ArtifactCredentials, InputArtifacts, OutputArtifacts and EncryptionKey: no artifact store or STS exists to issue them.
  • ListDeployActionExecutionTargets returns empty: no real deploy targets exist behind Deploy actions.
  • ListWebhookItem.ErrorCode/ErrorMessage are never set: webhook registration against a third party cannot fail in an emulator.
  • Built-in action providers other than Build/CodeBuild, Invoke/Lambda, Deploy/CodeDeploy and Source/Deploy S3 (ECR, CodeCommit, ...) always Succeed in runOneAction: no real source/deploy targets. Custom-owner actions are real: a Queued job is created for the worker (PollForJobs/Put*JobResult).
  • Build/CodeBuild waits for the real build status, but the emulated build runs no buildspec: the primary input artifact is passed through unchanged as every output artifact, and exported variables are not produced. Source/S3 and Deploy/S3 move real objects when the S3 seam is wired (internal/app/cli.go wireCodePipelineS3); the artifact store key is derived from pipeline, artifact name and execution ID. A missing source object fails the action with ConfigurationError (code chosen from the FailureType enum; the docs name none).
Deferred
  • Subsystem-gated work: see items_still_open.

More

Documentation

Overview

Package codepipeline provides an in-memory implementation of the AWS CodePipeline service.

Index

Constants

View Source
const (

	// PipelineTypeV1 and PipelineTypeV2 are the valid PipelineType values.
	PipelineTypeV1 = "V1"
	PipelineTypeV2 = "V2"

	// ExecutionModeQueued is the QUEUED execution mode.
	ExecutionModeQueued = "QUEUED"
	// ExecutionModeSuperseded is the SUPERSEDED execution mode.
	ExecutionModeSuperseded = "SUPERSEDED"
	// ExecutionModeParallel is the PARALLEL execution mode.
	ExecutionModeParallel = "PARALLEL"

	// WebhookAuthGitHubHMAC is the GITHUB_HMAC authentication type for webhooks.
	WebhookAuthGitHubHMAC = "GITHUB_HMAC"
	// WebhookAuthIP is the IP authentication type for webhooks.
	WebhookAuthIP = "IP"
	// WebhookAuthUnauthenticated is the UNAUTHENTICATED authentication type for webhooks.
	WebhookAuthUnauthenticated = "UNAUTHENTICATED"
)

Variables

View Source
var (
	// ErrNotFound is returned when a pipeline resource does not exist.
	ErrNotFound = awserr.New("PipelineNotFoundException", awserr.ErrNotFound)
	// ErrPipelineNameInUse is returned when a pipeline with the same name already exists.
	ErrPipelineNameInUse = awserr.New("PipelineNameInUseException", awserr.ErrAlreadyExists)
	// ErrAlreadyExists is returned when a non-pipeline resource with the same key already exists.
	ErrAlreadyExists = awserr.New("InvalidStructureException", awserr.ErrAlreadyExists)
	// ErrActionTypeNotFound is returned when a requested custom action type does not exist.
	ErrActionTypeNotFound = awserr.New("ActionTypeNotFoundException", awserr.ErrNotFound)
	// ErrJobNotFound is returned when a requested job does not exist.
	ErrJobNotFound = awserr.New("JobNotFoundException", awserr.ErrNotFound)
	// ErrWebhookNotFound is returned when a requested webhook does not exist.
	ErrWebhookNotFound = awserr.New("WebhookNotFoundException", awserr.ErrNotFound)
	// ErrInvalidNextToken is returned for a malformed pagination token.
	ErrInvalidNextToken = awserr.New("InvalidNextTokenException", awserr.ErrInvalidParameter)
	// ErrValidation is returned when request input fails validation.
	ErrValidation = awserr.New("ValidationException", awserr.ErrInvalidParameter)
	// ErrConflict is returned on optimistic-concurrency version mismatch.
	ErrConflict = awserr.New("ConflictException", awserr.ErrConflict)
	// ErrResourceInUse is returned when a resource is referenced by another resource.
	ErrResourceInUse = awserr.New("ResourceInUseException", awserr.ErrAlreadyExists)
	// ErrResourceNotFound is returned for non-pipeline ARNs (e.g. webhook ARNs).
	ErrResourceNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound)
	// ErrStageNotFound is returned when a stage name does not exist in a pipeline.
	ErrStageNotFound = awserr.New("StageNotFoundException", awserr.ErrNotFound)
	// ErrInvalidStructure is returned for structural pipeline validation errors.
	ErrInvalidStructure = awserr.New("InvalidStructureException", awserr.ErrInvalidParameter)
	// ErrExecutionNotFound is returned when a requested pipeline execution ID does not exist.
	ErrExecutionNotFound = awserr.New("PipelineExecutionNotFoundException", awserr.ErrNotFound)
	// ErrVersionNotFound is returned when a requested pipeline version does not exist.
	ErrVersionNotFound = awserr.New("PipelineVersionNotFoundException", awserr.ErrNotFound)
	// ErrActionNotFound is returned when a stage/action name does not exist,
	// or (for PutApprovalResult) does not identify an Approval-category action.
	ErrActionNotFound = awserr.New("ActionNotFoundException", awserr.ErrNotFound)
	// ErrInvalidApprovalToken is returned when PutApprovalResult's token does
	// not match the pending approval request's system-generated token.
	ErrInvalidApprovalToken = awserr.New("InvalidApprovalTokenException", awserr.ErrInvalidParameter)
	// ErrApprovalAlreadyCompleted is returned when PutApprovalResult targets
	// an action with no open (InProgress) approval request.
	ErrApprovalAlreadyCompleted = awserr.New("ApprovalAlreadyCompletedException", awserr.ErrConflict)
	// ErrStageNotRetryable is returned when RetryStageExecution targets a
	// stage/execution pair with no failed action to retry.
	ErrStageNotRetryable = awserr.New("StageNotRetryableException", awserr.ErrInvalidParameter)
	// ErrUnableToRollbackStage is returned when RollbackStage's target
	// execution never completed the given stage successfully.
	ErrUnableToRollbackStage = awserr.New("UnableToRollbackStageException", awserr.ErrInvalidParameter)
	// ErrActionExecutionNotFound is returned when ListDeployActionExecutionTargets'
	// ActionExecutionId does not match any recorded action execution.
	ErrActionExecutionNotFound = awserr.New("ActionExecutionNotFoundException", awserr.ErrNotFound)
	// ErrInvalidJobState is returned when a job result targets a job that is
	// already complete or whose action execution is no longer in progress.
	ErrInvalidJobState = awserr.New("InvalidJobStateException", awserr.ErrInvalidParameter)
	// ErrConditionNotOverridable is returned when OverrideStageCondition targets a condition that has not failed.
	ErrConditionNotOverridable = awserr.New("ConditionNotOverridableException", awserr.ErrInvalidParameter)
	// ErrInvalidClientToken is returned when a third-party job operation's
	// clientToken does not match the ClientId issued for that job by
	// PollForThirdPartyJobs.
	ErrInvalidClientToken = awserr.New("InvalidClientTokenException", awserr.ErrInvalidParameter)
)
View Source
var ErrNilAppContext = errors.New("AppContext is required")

ErrNilAppContext is returned when Provider.Init is called with a nil AppContext.

Functions

This section is empty.

Types

type Action

type Action struct {
	Configuration    map[string]string `json:"configuration,omitempty"`
	ActionTypeID     ActionTypeID      `json:"actionTypeId"`
	Name             string            `json:"name"`
	RoleArn          string            `json:"roleArn,omitempty"`
	Region           string            `json:"region,omitempty"`
	Namespace        string            `json:"namespace,omitempty"`
	InputArtifacts   []ArtifactRef     `json:"inputArtifacts,omitempty"`
	OutputArtifacts  []ArtifactRef     `json:"outputArtifacts,omitempty"`
	RunOrder         int               `json:"runOrder,omitempty"`
	TimeoutInMinutes int               `json:"timeoutInMinutes,omitempty"`
}

Action represents a single action within a pipeline stage.

type ActionConfigurationProperty

type ActionConfigurationProperty struct {
	Description string `json:"description,omitempty"`
	Name        string `json:"name"`
	Type        string `json:"type,omitempty"`
	Key         bool   `json:"key"`
	Queryable   bool   `json:"queryable,omitempty"`
	Required    bool   `json:"required"`
	Secret      bool   `json:"secret"`
}

ActionConfigurationProperty represents a property in a custom action type's configuration.

type ActionExecution

type ActionExecution struct {
	StartTime           time.Time         `json:"startTime"`
	LastUpdateTime      time.Time         `json:"lastUpdateTime"`
	PipelineExecutionID string            `json:"pipelineExecutionId"`
	ActionExecutionID   string            `json:"actionExecutionId"`
	StageName           string            `json:"stageName"`
	ActionName          string            `json:"actionName"`
	Status              string            `json:"status"`
	OutputVariables     map[string]string `json:"outputVariables,omitempty"`
	Token               string            `json:"token,omitempty"`
	Summary             string            `json:"summary,omitempty"`
	ExternalExecutionID string            `json:"externalExecutionId,omitempty"`
	ErrorCode           string            `json:"errorCode,omitempty"`
	ErrorMessage        string            `json:"errorMessage,omitempty"`
	PercentComplete     int32             `json:"percentComplete,omitempty"`
}

ActionExecution records a single action's execution within a pipeline run.

Token carries the system-generated approval token while the action is a gating Approval-category action awaiting PutApprovalResult (InProgress with a non-empty Token); it is cleared once the approval is resolved. Summary carries the reviewer's PutApprovalResult summary, mirroring the real ActionExecution.Summary field.

type ActionRevisionRecord added in v1.2.0

type ActionRevisionRecord struct {
	RevisionID       string  `json:"revisionId"`
	RevisionChangeID string  `json:"revisionChangeId"`
	Created          float64 `json:"created"`
}

ActionRevisionRecord tracks the most recent ActionRevision submitted via PutActionRevision for a single pipeline/stage/action, surfaced back through GetPipelineState's ActionState.CurrentRevision.

type ActionTypeExecutor added in v1.2.0

type ActionTypeExecutor struct {
	Configuration            *ActionTypeExecutorConfiguration `json:"configuration"`
	Type                     string                           `json:"type"`
	JobTimeout               *int                             `json:"jobTimeout,omitempty"`
	PolicyStatementsTemplate string                           `json:"policyStatementsTemplate,omitempty"`
}

ActionTypeExecutor is types.ActionTypeExecutor's wire-equivalent: the action engine (Lambda or JobWorker integration model) for an action type managed via the newer ActionTypeDeclaration shape (GetActionType/UpdateActionType), as opposed to the legacy ActionType shape (CreateCustomActionType/ListActionTypes) which has no Executor concept at all.

type ActionTypeExecutorConfiguration added in v1.2.0

type ActionTypeExecutorConfiguration struct {
	// JobWorkerExecutorConfiguration configures Executor.Type == "JobWorker".
	JobWorkerExecutorConfiguration *JobWorkerExecutorConfig `json:"jobWorkerExecutorConfiguration,omitempty"`
	// LambdaExecutorConfiguration configures Executor.Type == "Lambda".
	LambdaExecutorConfiguration *LambdaExecutorConfig `json:"lambdaExecutorConfiguration,omitempty"`
}

ActionTypeExecutorConfiguration is types.ExecutorConfiguration's wire-equivalent: exactly one of JobWorkerExecutorConfiguration/LambdaExecutorConfiguration is set, matching the real SDK (a union in practice, though not enforced as one server-side).

type ActionTypeID

type ActionTypeID struct {
	Category string `json:"category"`
	Owner    string `json:"owner"`
	Provider string `json:"provider"`
	Version  string `json:"version"`
}

ActionTypeID represents the identifier for an action type.

type ActionTypePermissions added in v1.2.0

type ActionTypePermissions struct {
	AllowedAccounts []string `json:"allowedAccounts,omitempty"`
}

ActionTypePermissions is types.ActionTypePermissions' wire-equivalent.

type ActionTypeProperty added in v1.2.0

type ActionTypeProperty struct {
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
	Key         bool   `json:"key"`
	NoEcho      bool   `json:"noEcho"`
	Optional    bool   `json:"optional"`
	Queryable   bool   `json:"queryable,omitempty"`
}

ActionTypeProperty is types.ActionTypeProperty's wire-equivalent: the ActionTypeDeclaration-shaped sibling of ActionConfigurationProperty (used by the legacy CreateCustomActionType/ListActionTypes shape). Same role, different real SDK type -- NoEcho/Optional here vs Required/Secret there.

type ActionTypeSettings

type ActionTypeSettings struct {
	EntityURLTemplate          string `json:"entityUrlTemplate,omitempty"`
	ExecutionURLTemplate       string `json:"executionUrlTemplate,omitempty"`
	RevisionURLTemplate        string `json:"revisionUrlTemplate,omitempty"`
	ThirdPartyConfigurationURL string `json:"thirdPartyConfigurationUrl,omitempty"`
}

ActionTypeSettings represents the URLs for a custom action type.

type ActionTypeUrls added in v1.2.0

type ActionTypeUrls struct {
	ConfigurationURL     string `json:"configurationUrl,omitempty"`
	EntityURLTemplate    string `json:"entityUrlTemplate,omitempty"`
	ExecutionURLTemplate string `json:"executionUrlTemplate,omitempty"`
	RevisionURLTemplate  string `json:"revisionUrlTemplate,omitempty"`
}

ActionTypeUrls is types.ActionTypeUrls' wire-equivalent: the ActionTypeDeclaration-shaped sibling of ActionTypeSettings. Not a superset/subset of ActionTypeSettings -- ConfigurationURL has no legacy equivalent and ThirdPartyConfigurationUrl has no declaration equivalent, confirmed against types.ActionTypeUrls/types.ActionTypeSettings.

type ArtifactDetails

type ArtifactDetails struct {
	MinimumCount int `json:"minimumCount"`
	MaximumCount int `json:"maximumCount"`
}

ArtifactDetails represents min/max artifact counts for a custom action type.

type ArtifactRef

type ArtifactRef struct {
	Name string `json:"name"`
}

ArtifactRef represents a reference to an artifact.

type ArtifactRevision

type ArtifactRevision struct {
	Created                  time.Time `json:"created"`
	Name                     string    `json:"name"`
	RevisionID               string    `json:"revisionId"`
	RevisionChangeIdentifier string    `json:"revisionChangeIdentifier,omitempty"`
}

ArtifactRevision is the revision of a source artifact included in a pipeline execution.

type ArtifactS3

type ArtifactS3 interface {
	GetObject(ctx context.Context, input *s3.GetObjectInput) (*s3.GetObjectOutput, error)
	PutObject(ctx context.Context, input *s3.PutObjectInput) (*s3.PutObjectOutput, error)
}

ArtifactS3 is the S3 surface Source/S3 and Deploy/S3 actions and the pipeline artifact store need, wired via SetArtifactS3.

type ArtifactStore

type ArtifactStore struct {
	EncryptionKey *EncryptionKey `json:"encryptionKey,omitempty"`
	Type          string         `json:"type"`
	Location      string         `json:"location"`
}

ArtifactStore represents the artifact store for a pipeline stage.

type BeforeEntryConditions

type BeforeEntryConditions struct {
	Conditions []Condition `json:"conditions"`
}

BeforeEntryConditions are the entry conditions of a stage.

type BuildRequest

type BuildRequest struct {
	ProjectName string
	// SourceLocation is "bucket/key" of the primary input artifact, empty when none is staged.
	SourceLocation    string
	BuildspecOverride string
}

BuildRequest is what a Build/CodeBuild action hands CodeBuild.

type CodeBuildRunner

type CodeBuildRunner interface {
	CodeBuildStarter
	// RunBuild starts a build and returns its ID.
	RunBuild(ctx context.Context, req BuildRequest) (string, error)
	// BuildStatus returns the build's current status (e.g. IN_PROGRESS, SUCCEEDED, FAILED, STOPPED).
	BuildStatus(ctx context.Context, buildID string) (string, error)
}

CodeBuildRunner is the CodeBuildStarter extension that lets a Build action wait on the build's final status. A starter that also implements it is run asynchronously: the action stays InProgress until BuildStatus is terminal.

type CodeBuildStarter

type CodeBuildStarter interface {
	// StartBuild starts a build for the named project in the region ctx carries.
	// An error (e.g. the project does not exist) fails the pipeline action.
	StartBuild(ctx context.Context, projectName string) error
}

CodeBuildStarter is the subset of CodeBuild operations CodePipeline needs to run a Build/CodeBuild action, wired via SetCodeBuildBackend. When unset, Build actions complete instantly with no cross-service call, matching this backend's original behavior.

type CodeDeployStarter

type CodeDeployStarter interface {
	// CreateDeployment starts a deployment in the region ctx carries. An error
	// (e.g. either does not exist) fails the pipeline action.
	CreateDeployment(ctx context.Context, applicationName, deploymentGroupName string) error
}

CodeDeployStarter is the subset of CodeDeploy operations CodePipeline needs to run a Deploy/CodeDeploy action, wired via SetCodeDeployBackend. When unset, Deploy actions complete instantly with no cross-service call, matching this backend's original behavior.

type Condition

type Condition struct {
	Result string `json:"result,omitempty"`
	Rules  []Rule `json:"rules,omitempty"`
}

Condition represents a set of rules that control stage entry or exit.

type ConditionExecution

type ConditionExecution struct {
	LastStatusChange time.Time  `json:"lastStatusChange"`
	Status           string     `json:"status"`
	Summary          string     `json:"summary,omitempty"`
	Result           string     `json:"result,omitempty"`
	Rules            []*RuleRun `json:"rules"`
}

ConditionExecution is the evaluation of one declared Condition.

type ConditionRun

type ConditionRun struct {
	LastStatusChange    time.Time             `json:"lastStatusChange"`
	PipelineExecutionID string                `json:"pipelineExecutionId"`
	StageName           string                `json:"stageName"`
	ConditionType       string                `json:"conditionType"`
	Status              string                `json:"status"`
	Summary             string                `json:"summary,omitempty"`
	Result              string                `json:"result,omitempty"`
	Conditions          []*ConditionExecution `json:"conditions"`
	AutoRetried         bool                  `json:"autoRetried,omitempty"`
}

ConditionRun is the evaluation of a stage's BEFORE_ENTRY, ON_SUCCESS or ON_FAILURE conditions.

type CustomActionType

type CustomActionType struct {
	Settings    *ActionTypeSettings    `json:"settings,omitempty"`
	Urls        *ActionTypeUrls        `json:"urls,omitempty"`
	Permissions *ActionTypePermissions `json:"permissions,omitempty"`
	Executor    *ActionTypeExecutor    `json:"executor,omitempty"`
	// Tags is never marshaled into a real wire response (every handler that
	// returns a CustomActionType builds its own response struct instead --
	// see customActionTypeResponse/actionTypeDeclarationResponse) but IS
	// marshaled by persistence.go's DTO Value, so this must stay visible to
	// json.Marshal or a Snapshot/Restore cycle silently drops the tags.
	Tags        map[string]string `json:"tags,omitempty"`
	Description string            `json:"description,omitempty"`
	Owner       string            `json:"owner"`
	Provider    string            `json:"provider"`
	Version     string            `json:"version"`
	Category    string            `json:"category"`

	ConfigurationProperties []ActionConfigurationProperty `json:"configurationProperties,omitempty"`
	Properties              []ActionTypeProperty          `json:"properties,omitempty"`
	OutputArtifactDetails   ArtifactDetails               `json:"outputArtifactDetails"`
	InputArtifactDetails    ArtifactDetails               `json:"inputArtifactDetails"`
	// contains filtered or unexported fields
}

CustomActionType represents an in-memory custom action type.

Field order here is fieldalignment-optimized (slices, then same-size structs/ strings, then pointers/maps), not declaration/grouping order -- see the doc comments below for which real API shape each field belongs to.

type EncryptionKey

type EncryptionKey struct {
	ID   string `json:"id"`
	Type string `json:"type"`
}

EncryptionKey represents a KMS or custom encryption key for an artifact store.

type FailureConditions

type FailureConditions struct {
	RetryConfiguration *RetryConfiguration `json:"retryConfiguration,omitempty"`
	Result             string              `json:"result,omitempty"`
	Conditions         []Condition         `json:"conditions,omitempty"`
}

FailureConditions describe what happens when a stage fails.

type GitBranchFilterCriteria

type GitBranchFilterCriteria struct {
	Includes []string `json:"includes,omitempty"`
	Excludes []string `json:"excludes,omitempty"`
}

GitBranchFilterCriteria is the include/exclude filter for branch names.

type GitConfiguration

type GitConfiguration struct {
	SourceActionName string                 `json:"sourceActionName"`
	Push             []GitPushFilter        `json:"push,omitempty"`
	PullRequest      []GitPullRequestFilter `json:"pullRequest,omitempty"`
}

GitConfiguration holds the source action name and push/PR trigger filters.

type GitFilePathsFilterCriteria

type GitFilePathsFilterCriteria struct {
	Includes []string `json:"includes,omitempty"`
	Excludes []string `json:"excludes,omitempty"`
}

GitFilePathsFilterCriteria is the include/exclude filter for file paths.

type GitPullRequestFilter

type GitPullRequestFilter struct {
	Branches  *GitBranchFilterCriteria    `json:"branches,omitempty"`
	FilePaths *GitFilePathsFilterCriteria `json:"filePaths,omitempty"`
	Events    []string                    `json:"events,omitempty"`
}

GitPullRequestFilter describes what pull request events trigger the pipeline.

type GitPushFilter

type GitPushFilter struct {
	Branches  *GitBranchFilterCriteria    `json:"branches,omitempty"`
	Tags      *GitTagFilterCriteria       `json:"tags,omitempty"`
	FilePaths *GitFilePathsFilterCriteria `json:"filePaths,omitempty"`
}

GitPushFilter describes what git push events trigger the pipeline.

type GitTagFilterCriteria

type GitTagFilterCriteria struct {
	Includes []string `json:"includes,omitempty"`
	Excludes []string `json:"excludes,omitempty"`
}

GitTagFilterCriteria is the include/exclude filter for git tags.

type Handler

type Handler struct {
	Backend *InMemoryBackend
	// contains filtered or unexported fields
}

Handler is the Echo HTTP handler for CodePipeline operations.

func NewHandler

func NewHandler(backend *InMemoryBackend) *Handler

NewHandler creates a new CodePipeline handler backed by backend.

func (*Handler) ChaosOperations

func (h *Handler) ChaosOperations() []string

ChaosOperations returns all operations that can be fault-injected.

func (*Handler) ChaosRegions

func (h *Handler) ChaosRegions() []string

ChaosRegions returns all regions this handler instance handles.

func (*Handler) ChaosServiceName

func (h *Handler) ChaosServiceName() string

ChaosServiceName returns the lowercase AWS service name for fault rule matching.

func (*Handler) ExtractOperation

func (h *Handler) ExtractOperation(c *echo.Context) string

ExtractOperation extracts the CodePipeline action from the X-Amz-Target header.

func (*Handler) ExtractResource

func (h *Handler) ExtractResource(_ *echo.Context) string

ExtractResource extracts the resource identifier from the request (not used for CodePipeline).

func (*Handler) GetSupportedOperations

func (h *Handler) GetSupportedOperations() []string

GetSupportedOperations returns the list of supported operations.

func (*Handler) Handler

func (h *Handler) Handler() echo.HandlerFunc

Handler returns the Echo handler function for CodePipeline requests.

func (*Handler) MatchPriority

func (h *Handler) MatchPriority() int

MatchPriority returns the routing priority.

func (*Handler) Name

func (h *Handler) Name() string

Name returns the service name.

func (*Handler) Reset

func (h *Handler) Reset()

Reset clears all handler and backend state.

func (*Handler) Restore

func (h *Handler) Restore(ctx context.Context, data []byte) error

Restore implements persistence.Persistable by delegating to the backend.

func (*Handler) RouteMatcher

func (h *Handler) RouteMatcher() service.Matcher

RouteMatcher returns a function that matches CodePipeline requests.

func (*Handler) Snapshot

func (h *Handler) Snapshot(ctx context.Context) []byte

Snapshot implements persistence.Persistable by delegating to the backend.

func (*Handler) StartWorker

func (h *Handler) StartWorker(ctx context.Context) error

StartWorker polls in-flight Build actions until ctx ends. It implements service.Registerable's worker hook.

type InMemoryBackend

type InMemoryBackend struct {
	// contains filtered or unexported fields
}

InMemoryBackend is a thread-safe in-memory store for CodePipeline resources.

pipelines, customActionTypes, jobs, webhooks, and stageTransitions are flat store.Table collections keyed by a composite "region|id" string (see regionKey below), replacing the old map[string]map[K]*V nesting (outer key = region) that isolated same-named resources across regions. Each table's companion *store.Index values replace the old per-region iteration/reverse-ARN-map lookups -- see store_setup.go. executions and actionExecutions remain plain region-nested maps: their values are bare []*T slices with no identity of their own, so they are not candidates for store.Table (see pkgs/store's package doc). Callers must hold b.mu while accessing any of these collections.

func NewInMemoryBackend

func NewInMemoryBackend(accountID, region string) *InMemoryBackend

NewInMemoryBackend creates a new backend for the given account and region.

func (*InMemoryBackend) AcknowledgeJob

func (b *InMemoryBackend) AcknowledgeJob(ctx context.Context, jobID, nonce string) (string, error)

AcknowledgeJob acknowledges that a job worker has received a job. Returns InProgress if Nonce matches; otherwise returns current status unchanged.

func (*InMemoryBackend) AcknowledgeThirdPartyJob

func (b *InMemoryBackend) AcknowledgeThirdPartyJob(
	ctx context.Context,
	jobID, nonce, clientToken string,
) (string, error)

AcknowledgeThirdPartyJob acknowledges that a third-party job worker has received a job.

func (*InMemoryBackend) AddCustomActionTypeInternal

func (b *InMemoryBackend) AddCustomActionTypeInternal(cat *CustomActionType)

AddCustomActionTypeInternal seeds a custom action type into the backend's default region (for testing).

func (*InMemoryBackend) AddJobInternal

func (b *InMemoryBackend) AddJobInternal(job *Job)

AddJobInternal seeds a job into the backend's default region (for testing).

func (*InMemoryBackend) AddPipelineInternal

func (b *InMemoryBackend) AddPipelineInternal(decl PipelineDeclaration, tags map[string]string) *Pipeline

AddPipelineInternal seeds a pipeline directly into the backend's default region (for testing).

func (*InMemoryBackend) AddWebhookInternal

func (b *InMemoryBackend) AddWebhookInternal(wh *Webhook)

AddWebhookInternal seeds a webhook into the backend's default region (for testing).

func (*InMemoryBackend) CreateCustomActionType

func (b *InMemoryBackend) CreateCustomActionType(
	ctx context.Context,
	cat *CustomActionType,
) (*CustomActionType, error)

CreateCustomActionType stores a new custom action type.

gopherstack-wlab: the guard below emits InvalidStructureException on a duplicate category/provider/version -- not in this op's declared error set per botocore codepipeline/2015-07-09/service-2.json (ConcurrentModificationException/InvalidTagsException/ LimitExceededException/TooManyTagsException/ValidationException only). Left unfixed: no declared code's doc text fits "duplicate", and the idempotent-upsert theory tried in gopherstack-3djp doesn't hold (see DeleteCustomActionType). NOTE: this does not break errors.As for a real caller -- see undeclared_error_codes_test.go.

func (*InMemoryBackend) CreatePipeline

func (b *InMemoryBackend) CreatePipeline(
	ctx context.Context,
	decl PipelineDeclaration,
	tags map[string]string,
) (*Pipeline, error)

CreatePipeline creates a new CodePipeline pipeline.

func (*InMemoryBackend) DeleteCustomActionType

func (b *InMemoryBackend) DeleteCustomActionType(ctx context.Context, category, provider, version string) error

DeleteCustomActionType removes a custom action type.

gopherstack-wlab: the guard below emits ActionTypeNotFoundException on a nonexistent type -- not in this op's declared error set per botocore codepipeline/2015-07-09/service-2.json (ConcurrentModificationException/ ValidationException only). Left unfixed: the "HTTP 200, empty body" doc sentence cited in gopherstack-3djp for an idempotent-delete fix is generic Response-shape boilerplate (also appears on DisableStageTransition, which DOES throw PipelineNotFoundException on a missing pipeline) -- not evidence either way. No declared code fits "not found". NOTE: this does not break errors.As for a real caller -- see undeclared_error_codes_test.go. Returns ErrResourceInUse (wire ValidationException) if any pipeline references the type.

func (*InMemoryBackend) DeletePipeline

func (b *InMemoryBackend) DeletePipeline(ctx context.Context, name string) error

DeletePipeline removes the pipeline with the given name and cleans up associated state.

gopherstack-wlab: the guard below emits PipelineNotFoundException on a nonexistent name -- not in this op's declared error set per botocore codepipeline/2015-07-09/service-2.json (ConcurrentModificationException/ ValidationException only). Left unfixed: the "HTTP 200, empty body" doc sentence cited in gopherstack-3djp for an idempotent-delete fix is generic Response-shape boilerplate (also appears on DisableStageTransition, which DOES throw PipelineNotFoundException on a missing pipeline) -- not evidence either way. No declared code fits "not found". NOTE: this does not break errors.As for a real caller -- see undeclared_error_codes_test.go.

func (*InMemoryBackend) DeleteWebhook

func (b *InMemoryBackend) DeleteWebhook(ctx context.Context, name string) error

DeleteWebhook removes a webhook by name (idempotent).

func (*InMemoryBackend) DeregisterWebhookWithThirdParty

func (b *InMemoryBackend) DeregisterWebhookWithThirdParty(ctx context.Context, name string) error

DeregisterWebhookWithThirdParty clears the third-party registration flag on a webhook.

func (*InMemoryBackend) DisableStageTransition

func (b *InMemoryBackend) DisableStageTransition(
	ctx context.Context,
	pipelineName, stageName, transitionType, reason string,
) error

DisableStageTransition disables a stage transition and records the reason. Returns StageNotFoundException if stageName does not exist in the pipeline.

func (*InMemoryBackend) EnableStageTransition

func (b *InMemoryBackend) EnableStageTransition(
	ctx context.Context,
	pipelineName, stageName, transitionType string,
) error

EnableStageTransition re-enables a stage transition and, since real AWS resumes any artifacts that were waiting on it without requiring a further client call, re-drives runPipelineActions for every InProgress execution of the pipeline so a run parked at this gate (see runPipelineActions in action_engine.go) can proceed.

func (*InMemoryBackend) GetActionType

func (b *InMemoryBackend) GetActionType(
	ctx context.Context,
	category, owner, provider, version string,
) (*CustomActionType, error)

GetActionType retrieves a custom action type.

func (*InMemoryBackend) GetJobDetails

func (b *InMemoryBackend) GetJobDetails(ctx context.Context, jobID string) (*Job, error)

GetJobDetails returns details for a job by ID.

func (*InMemoryBackend) GetPipeline

func (b *InMemoryBackend) GetPipeline(ctx context.Context, name string) (*Pipeline, error)

GetPipeline returns the pipeline with the given name.

func (*InMemoryBackend) GetPipelineExecution

func (b *InMemoryBackend) GetPipelineExecution(
	ctx context.Context,
	pipelineName, executionID string,
) (*PipelineExecution, error)

GetPipelineExecution returns the stored execution by pipeline name and execution ID.

func (*InMemoryBackend) GetPipelineState

func (b *InMemoryBackend) GetPipelineState(ctx context.Context, pipelineName string) ([]StageState, error)

GetPipelineState returns the current state of each stage in a pipeline.

func (*InMemoryBackend) GetStageTransitionState

func (b *InMemoryBackend) GetStageTransitionState(
	ctx context.Context,
	pipelineName, stageName, transitionType string,
) *StageTransitionState

GetStageTransitionState returns the disabled state for a stage transition, or nil if enabled.

func (*InMemoryBackend) GetThirdPartyJobDetails

func (b *InMemoryBackend) GetThirdPartyJobDetails(ctx context.Context, jobID, clientToken string) (*Job, error)

GetThirdPartyJobDetails returns details for a third-party job.

func (*InMemoryBackend) ListActionExecutions

func (b *InMemoryBackend) ListActionExecutions(
	ctx context.Context,
	pipelineName, pipelineExecutionID string,
) ([]map[string]any, error)

ListActionExecutions returns the recorded action executions for a pipeline, most recent first. An optional pipelineExecutionId filters to a single run.

func (*InMemoryBackend) ListActionTypes

func (b *InMemoryBackend) ListActionTypes(ctx context.Context) []*CustomActionType

ListActionTypes returns all registered action types in the request region.

func (*InMemoryBackend) ListDeployActionExecutionTargets

func (b *InMemoryBackend) ListDeployActionExecutionTargets(
	ctx context.Context,
	pipelineName, executionID string,
) ([]map[string]any, error)

ListDeployActionExecutionTargets returns the deploy targets for an action execution. Real ListDeployActionExecutionTargetsInput marks only ActionExecutionId required (codepipeline@v1.49.4 api_op_ListDeployActionExecutionTargets.go); PipelineName is an optional narrowing filter, so an ActionExecutionId alone must resolve by scanning every pipeline in the region -- gopherstack-2wvq. The emulator does not model deployment targets, so a resolved execution still returns an empty (but valid) list.

func (*InMemoryBackend) ListPipelineExecutions

func (b *InMemoryBackend) ListPipelineExecutions(
	ctx context.Context,
	pipelineName string,
) ([]PipelineExecution, error)

ListPipelineExecutions returns stored executions for a pipeline, most recent first.

func (*InMemoryBackend) ListPipelines

func (b *InMemoryBackend) ListPipelines(ctx context.Context) []PipelineSummary

ListPipelines returns a sorted summary of all pipelines in the request region.

func (*InMemoryBackend) ListRuleExecutions

func (b *InMemoryBackend) ListRuleExecutions(
	ctx context.Context, pipelineName, pipelineExecutionID string,
) ([]map[string]any, error)

ListRuleExecutions returns the recorded rule executions of a pipeline, most recent first, optionally narrowed to one pipeline execution.

func (*InMemoryBackend) ListRuleTypes

func (b *InMemoryBackend) ListRuleTypes() []map[string]any

ListRuleTypes returns the AWS-managed CodePipeline rule types. These mirror the built-in condition rule providers AWS exposes.

func (*InMemoryBackend) ListTagsForResource

func (b *InMemoryBackend) ListTagsForResource(
	ctx context.Context,
	resourceARN string,
) ([]Tag, error)

ListTagsForResource returns the sorted tags for a pipeline by ARN. Returns ResourceNotFoundException when the ARN refers to a non-pipeline resource.

func (*InMemoryBackend) ListWebhooks

func (b *InMemoryBackend) ListWebhooks(ctx context.Context) []*Webhook

ListWebhooks returns all webhooks in the request region, sorted by name.

func (*InMemoryBackend) OverrideStageCondition

func (b *InMemoryBackend) OverrideStageCondition(
	ctx context.Context,
	pipelineName, stageName, executionID, conditionType string,
) error

OverrideStageCondition marks the stage's failed BEFORE_ENTRY or ON_SUCCESS condition Overridden and resumes the execution past it. A condition that has not failed is ConditionNotOverridableException.

func (*InMemoryBackend) PollForJobs

func (b *InMemoryBackend) PollForJobs(ctx context.Context, category, owner, provider, version string) ([]*Job, error)

PollForJobs returns available queued jobs matching the given ActionTypeID.

func (*InMemoryBackend) PollForJobsQuery

func (b *InMemoryBackend) PollForJobsQuery(
	ctx context.Context, category, owner, provider, version string, query map[string]string,
) ([]*Job, error)

PollForJobsQuery is PollForJobs narrowed to jobs whose action configuration matches every key/value in query.

func (*InMemoryBackend) PollForThirdPartyJobs

func (b *InMemoryBackend) PollForThirdPartyJobs(
	ctx context.Context,
	category, provider, version string,
) ([]*Job, error)

PollForThirdPartyJobs returns available third-party jobs, lazily issuing each returned job's ClientId the first time it is handed out.

func (*InMemoryBackend) PutActionRevision

func (b *InMemoryBackend) PutActionRevision(
	ctx context.Context,
	pipelineName, stageName, actionName, revisionID, revisionChangeID string,
) (*PipelineExecution, bool, error)

PutActionRevision records a new ActionRevision for a pipeline source action and starts a new pipeline execution to process it, mirroring real AWS's "PutActionRevision triggers a pipeline execution" behavior. NewRevision reports whether revisionID differs from the previously stored revision for this stage/action (false the first time it is called with an identical revisionID, matching the real semantics of "was this revision already processed by this pipeline").

func (*InMemoryBackend) PutApprovalResult

func (b *InMemoryBackend) PutApprovalResult(
	ctx context.Context,
	pipelineName, stageName, actionName, token, status, summary string,
) (time.Time, error)

PutApprovalResult submits a manual approval or rejection for a pipeline's pending Approval-category action, resuming (Approved) or failing (Rejected) the paused pipeline execution that action gated -- see runPipelineActions in action_engine.go for how the gate is created. Returns the timestamp the result was recorded, for the wire response's approvedAt field.

func (*InMemoryBackend) PutJobFailureResult

func (b *InMemoryBackend) PutJobFailureResult(ctx context.Context, jobID, message, failureType string) error

PutJobFailureResult acknowledges job failure.

func (*InMemoryBackend) PutJobFailureResultWith

func (b *InMemoryBackend) PutJobFailureResultWith(ctx context.Context, jobID string, fail JobFailure) error

PutJobFailureResultWith is PutJobFailureResult carrying the full FailureDetails.

func (*InMemoryBackend) PutJobSuccessResult

func (b *InMemoryBackend) PutJobSuccessResult(ctx context.Context, jobID string) error

PutJobSuccessResult acknowledges job success.

func (*InMemoryBackend) PutJobSuccessResultWith

func (b *InMemoryBackend) PutJobSuccessResultWith(ctx context.Context, jobID string, res JobSuccess) error

PutJobSuccessResultWith is PutJobSuccessResult carrying the optional result members.

func (*InMemoryBackend) PutThirdPartyJobFailureResult

func (b *InMemoryBackend) PutThirdPartyJobFailureResult(
	ctx context.Context,
	jobID, clientToken, message, failureType string,
) error

PutThirdPartyJobFailureResult acknowledges third-party job failure.

func (*InMemoryBackend) PutThirdPartyJobFailureResultWith

func (b *InMemoryBackend) PutThirdPartyJobFailureResultWith(
	ctx context.Context, jobID, clientToken string, fail JobFailure,
) error

PutThirdPartyJobFailureResultWith is PutThirdPartyJobFailureResult carrying the full FailureDetails.

func (*InMemoryBackend) PutThirdPartyJobSuccessResult

func (b *InMemoryBackend) PutThirdPartyJobSuccessResult(ctx context.Context, jobID, clientToken string) error

PutThirdPartyJobSuccessResult acknowledges third-party job success.

func (*InMemoryBackend) PutThirdPartyJobSuccessResultWith

func (b *InMemoryBackend) PutThirdPartyJobSuccessResultWith(
	ctx context.Context, jobID, clientToken string, res JobSuccess,
) error

PutThirdPartyJobSuccessResultWith is PutThirdPartyJobSuccessResult carrying the optional result members.

func (*InMemoryBackend) PutWebhook

func (b *InMemoryBackend) PutWebhook(ctx context.Context, wh *Webhook) (*Webhook, error)

PutWebhook creates or updates a webhook with full definition fields.

func (*InMemoryBackend) Region

func (b *InMemoryBackend) Region() string

Region returns the default region for this backend instance.

func (*InMemoryBackend) RegisterWebhookWithThirdParty

func (b *InMemoryBackend) RegisterWebhookWithThirdParty(ctx context.Context, name string) error

RegisterWebhookWithThirdParty registers a webhook with a third-party provider.

func (*InMemoryBackend) Reset

func (b *InMemoryBackend) Reset()

Reset clears all state in the backend, resetting it to a pristine empty state.

func (*InMemoryBackend) Restore

func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error

Restore loads backend state from a JSON snapshot produced by Snapshot.

func (*InMemoryBackend) RetryStageExecution

func (b *InMemoryBackend) RetryStageExecution(
	ctx context.Context,
	pipelineName, stageName, executionID, retryMode string,
) (*PipelineExecution, error)

RetryStageExecution retries the failed actions of a stage within a specific pipeline execution. RetryMode FAILED_ACTIONS (the common case) resets only actions currently Failed/Abandoned in that stage; ALL_ACTIONS resets every action in the stage regardless of status. Either way, at least one action in the stage must currently be Failed/Abandoned for this execution or StageNotRetryableException is returned (matching real AWS, which only allows retrying a stage that actually failed). The reset actions are then re-run synchronously via runPipelineActions, resuming the SAME pipeline execution from that point -- unlike RollbackStage, retry never creates a new execution.

func (*InMemoryBackend) RollbackStage

func (b *InMemoryBackend) RollbackStage(
	ctx context.Context,
	pipelineName, stageName, targetExecutionID string,
) (*PipelineExecution, error)

RollbackStage rolls back stageName to the state it was in after targetExecutionID last completed it successfully, creating (and persisting) a new ROLLBACK-type PipelineExecution rather than mutating the target execution. Real AWS requires the target execution to have actually succeeded through that stage; this backend enforces the same precondition via stageSucceededInExecution and returns UnableToRollbackStageException otherwise.

func (*InMemoryBackend) SetArtifactS3

func (b *InMemoryBackend) SetArtifactS3(s ArtifactS3)

SetArtifactS3 wires S3 so Source/S3 and Deploy/S3 actions move real objects and the pipeline artifact store is materialised.

func (*InMemoryBackend) SetCodeBuildBackend

func (b *InMemoryBackend) SetCodeBuildBackend(codeBuild CodeBuildStarter)

SetCodeBuildBackend wires CodeBuild so a Build/CodeBuild action's ProjectName actually starts a build, instead of every action completing unconditionally with no cross-service call (gopherstack-cb9l).

func (*InMemoryBackend) SetCodeDeployBackend

func (b *InMemoryBackend) SetCodeDeployBackend(codeDeploy CodeDeployStarter)

SetCodeDeployBackend wires CodeDeploy so a Deploy/CodeDeploy action's ApplicationName/DeploymentGroupName actually starts a deployment, instead of every action completing unconditionally with no cross-service call.

func (*InMemoryBackend) SetLambdaBackend

func (b *InMemoryBackend) SetLambdaBackend(lambda LambdaInvoker)

SetLambdaBackend wires Lambda so an Invoke/Lambda action's FunctionName is actually invoked, instead of every action completing unconditionally with no cross-service call (gopherstack-cb9l).

func (*InMemoryBackend) Snapshot

func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte

Snapshot serialises the backend state to JSON. Returns nil on marshal failure.

func (*InMemoryBackend) StageSucceededInExecution

func (b *InMemoryBackend) StageSucceededInExecution(
	ctx context.Context,
	pipelineName, pipelineExecutionID, stageName string,
) bool

StageSucceededInExecution reports whether stageName succeeded within pipelineExecutionID, backing ListPipelineExecutions' Filter.SucceededInStage (types.SucceededInStageFilter). A stage is considered succeeded when at least one action execution is recorded for it in this run and every one of them completed Succeeded -- the mechanical definition this backend's flat ActionExecution records can support; there is no separate per-stage status anywhere else in this backend to consult instead.

func (*InMemoryBackend) StartPipelineExecution

func (b *InMemoryBackend) StartPipelineExecution(ctx context.Context, pipelineName string) (*PipelineExecution, error)

StartPipelineExecution starts and stores a new execution of a pipeline.

gopherstack runs every action synchronously via runPipelineActions (action_engine.go): ordinary actions complete instantly, but an Approval-category action gates the run and leaves the execution InProgress until PutApprovalResult resolves it (see PutApprovalResult in approvals.go). Leaving Status at statusInProgress unconditionally here (the pre-fix behavior) left every execution stuck InProgress forever, even when it contained no approval gate at all: GetPipelineExecution/ ListPipelineExecutions would never report a terminal status, so any client polling for completion (as the real, asynchronous AWS service expects callers to do) would spin indefinitely.

func (*InMemoryBackend) StartPipelineExecutionWith

func (b *InMemoryBackend) StartPipelineExecutionWith(
	ctx context.Context,
	pipelineName string,
	opts StartExecutionOptions,
) (*PipelineExecution, error)

StartPipelineExecutionWith starts an execution, resolving declared pipeline variables against opts.Variables and recording opts.SourceRevisions for actions the pipeline declares.

func (*InMemoryBackend) StopPipelineExecution

func (b *InMemoryBackend) StopPipelineExecution(
	ctx context.Context,
	pipelineName, executionID, reason string,
	abandon bool,
) (*PipelineExecution, error)

StopPipelineExecution stops a pipeline execution. Real AWS transitions through a transient "Stopping" state while in-progress actions finish (or are abandoned, if abandon is true) before reaching the terminal "Stopped" state. gopherstack runs every ordinary action synchronously and instantaneously (see StartPipelineExecution), so there is never an in-progress *ordinary* action left to wait for -- the execution goes straight to "Stopped" regardless of abandon. Leaving it at "Stopping" left every stopped execution stuck there forever, indistinguishable (to a polling client) from a stop request that never completed.

An execution can, however, still be genuinely InProgress here if it is gated on a manual approval (see runPipelineActions in action_engine.go): stopping such an execution abandons that pending approval action (marks it Abandoned and clears its token) so a subsequent PutApprovalResult against a stopped execution correctly fails instead of silently resurrecting it.

func (*InMemoryBackend) TagResource

func (b *InMemoryBackend) TagResource(ctx context.Context, resourceARN string, tags []Tag) error

TagResource adds or updates tags on a pipeline by ARN.

func (*InMemoryBackend) TaggedResources added in v1.3.1

func (b *InMemoryBackend) TaggedResources() []TaggedEntry

TaggedResources returns every pipeline and webhook ARN that currently has at least one tag applied via TagResource.

func (*InMemoryBackend) UntagResource

func (b *InMemoryBackend) UntagResource(
	ctx context.Context,
	resourceARN string,
	tagKeys []string,
) error

UntagResource removes tags from a pipeline by ARN.

func (*InMemoryBackend) UpdateActionType

func (b *InMemoryBackend) UpdateActionType(ctx context.Context, upd *CustomActionType) error

UpdateActionType updates an action type using the real ActionTypeDeclaration shape (Description/Executor/InputArtifactDetails/OutputArtifactDetails/ Permissions/Properties/Urls). Only fields ActionTypeDeclaration can express are replaced; the legacy CreateCustomActionType-era Settings/ConfigurationProperties (and Tags) have no equivalent in this op's real input and are preserved unchanged on the existing record -- AWS's real UpdateActionType has no way to clear data its own input shape can't carry.

func (*InMemoryBackend) UpdatePipeline

func (b *InMemoryBackend) UpdatePipeline(ctx context.Context, decl PipelineDeclaration) (*Pipeline, error)

UpdatePipeline replaces the pipeline declaration. decl.Version, if set by the caller, is IGNORED: real AWS's PipelineDeclaration.Version field is documented as purely informational/system-managed ("A new pipeline always has a version number of 1. This number is incremented when a pipeline is updated" -- aws-sdk-go-v2/service/codepipeline/types/types.go), with no documented optimistic-concurrency check against it anywhere in UpdatePipeline's contract, and the real UpdatePipeline API/CLI docs describe updating as always incrementing the version by exactly 1 regardless of what the caller sent. An earlier revision of this backend rejected a mismatched Version with a fabricated ConflictException (flagged, but left unfixed, in a prior audit pass -- see PARITY.md); that was gopherstack-invented behavior with no basis in the real API and has been removed.

type Job

type Job struct {
	ActionTypeID ActionTypeID `json:"actionTypeId,omitzero"`

	ID           string `json:"id"`
	PipelineName string `json:"pipelineName,omitempty"`
	Nonce        string `json:"nonce"`
	Status       string `json:"status"`
	// FailureMessage/FailureType carry PutJobFailureResult's FailureDetails.
	// Real AWS Job/JobDetails don't surface these back to callers either (see
	// PARITY.md) -- tracked here the same way Status is: internal state, not
	// echoed on the wire.
	FailureMessage string `json:"failureMessage,omitempty"`
	FailureType    string `json:"failureType,omitempty"`
	// Configuration, ExecutionID, StageName, ActionName and ActionExecutionID
	// tie a job created by a pipeline run back to its action execution.
	Configuration     map[string]string `json:"configuration,omitempty"`
	ExecutionID       string            `json:"executionId,omitempty"`
	StageName         string            `json:"stageName,omitempty"`
	ActionName        string            `json:"actionName,omitempty"`
	ActionExecutionID string            `json:"actionExecutionId,omitempty"`
	ContinuationToken string            `json:"continuationToken,omitempty"`
	// ClientID is issued the first time PollForThirdPartyJobs hands this job
	// to a worker and echoed back as ThirdPartyJob.ClientId; the four
	// ThirdPartyJob* consumer operations require their clientToken to match
	// it. Real AWS's SDK doc comments for ClientId and for ClientToken on
	// each consumer are identical ("The clientToken portion of the clientId
	// and clientToken pair..."), confirming it's the same value round-tripped
	// -- not derived from ActionTypeId, which many jobs can share. Unused
	// (empty) for plain (non-third-party) jobs.
	ClientID string `json:"clientId,omitempty"`
	// contains filtered or unexported fields
}

Job represents a CodePipeline job queued for a custom action.

type JobCurrentRevision

type JobCurrentRevision struct {
	Revision         string
	ChangeIdentifier string
	Created          float64
}

JobCurrentRevision mirrors types.CurrentRevision.

type JobExecutionDetails

type JobExecutionDetails struct {
	ExternalExecutionID string
	Summary             string
	PercentComplete     int32
}

JobExecutionDetails mirrors types.ExecutionDetails.

type JobFailure

type JobFailure struct {
	Message             string
	Type                string
	ExternalExecutionID string
}

JobFailure carries PutJobFailureResult's FailureDetails.

type JobSuccess

type JobSuccess struct {
	ExecutionDetails  *JobExecutionDetails
	CurrentRevision   *JobCurrentRevision
	OutputVariables   map[string]string
	ContinuationToken string
}

JobSuccess carries the optional members of PutJobSuccessResult and PutThirdPartyJobSuccessResult.

type JobWorkerExecutorConfig added in v1.2.0

type JobWorkerExecutorConfig struct {
	PollingAccounts          []string `json:"pollingAccounts,omitempty"`
	PollingServicePrincipals []string `json:"pollingServicePrincipals,omitempty"`
}

JobWorkerExecutorConfig is types.JobWorkerExecutorConfiguration's wire-equivalent: the accounts/service-principals allowed to poll for jobs when Executor.Type is "JobWorker". Both members are optional per the real SDK.

type LambdaExecutorConfig added in v1.2.0

type LambdaExecutorConfig struct {
	LambdaFunctionArn string `json:"lambdaFunctionArn,omitempty"`
}

LambdaExecutorConfig is types.LambdaExecutorConfiguration's wire-equivalent: the Lambda function backing an ActionTypeDeclaration's Executor when Executor.Type is "Lambda".

type LambdaInvoker

type LambdaInvoker interface {
	InvokeFunction(
		ctx context.Context,
		name, invocationType string,
		payload []byte,
	) ([]byte, int, error)
}

LambdaInvoker is the subset of Lambda operations CodePipeline needs to run an Invoke/Lambda action, wired via SetLambdaBackend. When unset, Invoke actions complete instantly with no cross-service call, matching this backend's original behavior. Same shape as the LambdaInvoker interface repeated across sns, stepfunctions/asl, eventbridge, etc. -- lambda.InMemoryBackend's InvokeFunction (invocationType aliased to string) satisfies it directly with no adapter.

type Pipeline

type Pipeline struct {
	Tags        map[string]string   `json:"tags"`
	Declaration PipelineDeclaration `json:"declaration"`
	Metadata    PipelineMetadata    `json:"metadata"`
	// contains filtered or unexported fields
}

Pipeline wraps the declaration and metadata.

type PipelineDeclaration

type PipelineDeclaration struct {
	ArtifactStores map[string]ArtifactStore `json:"artifactStores,omitempty"`
	ArtifactStore  ArtifactStore            `json:"artifactStore"`
	Name           string                   `json:"name"`
	RoleArn        string                   `json:"roleArn"`
	PipelineType   string                   `json:"pipelineType,omitempty"`
	ExecutionMode  string                   `json:"executionMode,omitempty"`
	Stages         []Stage                  `json:"stages"`
	Variables      []PipelineVariable       `json:"variables,omitempty"`
	Triggers       []Trigger                `json:"triggers,omitempty"`
	Version        int                      `json:"version"`
}

PipelineDeclaration represents the full pipeline structure.

type PipelineExecution

type PipelineExecution struct {
	StartTime                 time.Time                  `json:"startTime"`
	LastUpdateTime            time.Time                  `json:"lastUpdateTime"`
	ExecutionMode             string                     `json:"executionMode,omitempty"`
	PipelineExecutionID       string                     `json:"pipelineExecutionId"`
	Status                    string                     `json:"status"`
	Trigger                   string                     `json:"trigger,omitempty"`
	PipelineName              string                     `json:"pipelineName"`
	ExecutionType             string                     `json:"executionType,omitempty"`
	RollbackTargetExecutionID string                     `json:"rollbackTargetExecutionId,omitempty"`
	StopReason                string                     `json:"stopReason,omitempty"`
	StatusSummary             string                     `json:"statusSummary,omitempty"`
	Variables                 []ResolvedPipelineVariable `json:"variables,omitempty"`
	SourceRevisions           []SourceRevision           `json:"sourceRevisions,omitempty"`
	ArtifactRevisions         []ArtifactRevision         `json:"artifactRevisions,omitempty"`
	PipelineVersion           int                        `json:"pipelineVersion"`
}

PipelineExecution represents a stored pipeline execution.

RollbackTargetExecutionID is set only for ExecutionType ROLLBACK executions created by RollbackStage; it mirrors the real PipelineRollbackMetadata.RollbackTargetPipelineExecutionId field.

type PipelineMetadata

type PipelineMetadata struct {
	PipelineArn string  `json:"pipelineArn"`
	Created     float64 `json:"created"`
	Updated     float64 `json:"updated"`
}

PipelineMetadata holds pipeline metadata.

type PipelineSummary

type PipelineSummary struct {
	Name          string  `json:"name"`
	PipelineType  string  `json:"pipelineType,omitempty"`
	ExecutionMode string  `json:"executionMode,omitempty"`
	Version       int     `json:"version"`
	Created       float64 `json:"created"`
	Updated       float64 `json:"updated"`
}

PipelineSummary is a condensed view of a pipeline for listing. Real types.PipelineSummary (awsAwsjson11_deserializeDocumentPipelineSummary) has no pipelineArn member -- ListPipelines never surfaces it; use GetPipeline for the ARN.

type PipelineVariable

type PipelineVariable struct {
	Name         string `json:"name"`
	DefaultValue string `json:"defaultValue,omitempty"`
	Description  string `json:"description,omitempty"`
}

PipelineVariable represents a pipeline-level variable declaration.

type Provider

type Provider struct{}

Provider implements service.Provider for AWS CodePipeline.

func (*Provider) Init

Init initializes the CodePipeline service backend and handler.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the provider name.

type ResolvedPipelineVariable

type ResolvedPipelineVariable struct {
	Name          string `json:"name"`
	ResolvedValue string `json:"resolvedValue"`
}

ResolvedPipelineVariable is a pipeline variable's effective value for one execution.

type RetryConfiguration

type RetryConfiguration struct {
	RetryMode string `json:"retryMode,omitempty"`
}

RetryConfiguration configures automatic stage retry on failure.

type Rule

type Rule struct {
	Configuration  map[string]string `json:"configuration,omitempty"`
	RuleTypeID     ActionTypeID      `json:"ruleTypeId"`
	Name           string            `json:"name"`
	RoleArn        string            `json:"roleArn,omitempty"`
	Region         string            `json:"region,omitempty"`
	InputArtifacts []ArtifactRef     `json:"inputArtifacts,omitempty"`
	Commands       []string          `json:"commands,omitempty"`
	TimeoutMinutes int               `json:"timeoutInMinutes,omitempty"`
}

Rule represents a condition rule within a stage condition.

type RuleRun

type RuleRun struct {
	StartTime             time.Time         `json:"startTime"`
	LastUpdateTime        time.Time         `json:"lastUpdateTime"`
	Configuration         map[string]string `json:"configuration,omitempty"`
	ResolvedConfiguration map[string]string `json:"resolvedConfiguration,omitempty"`
	RuleTypeID            ActionTypeID      `json:"ruleTypeId"`
	RuleExecutionID       string            `json:"ruleExecutionId"`
	RuleName              string            `json:"ruleName"`
	Status                string            `json:"status"`
	Summary               string            `json:"summary,omitempty"`
	ErrorCode             string            `json:"errorCode,omitempty"`
	UpdatedBy             string            `json:"updatedBy,omitempty"`
	RoleArn               string            `json:"roleArn,omitempty"`
	Region                string            `json:"region,omitempty"`
	PipelineVersion       int               `json:"pipelineVersion"`
}

RuleRun is one execution of a condition rule within a pipeline execution.

type SourceRevision

type SourceRevision struct {
	ActionName string `json:"actionName"`
	RevisionID string `json:"revisionId"`
}

SourceRevision is a source-action revision pinned by StartPipelineExecution's SourceRevisions.

type Stage

type Stage struct {
	BeforeEntry *BeforeEntryConditions `json:"beforeEntry,omitempty"`
	OnFailure   *FailureConditions     `json:"onFailure,omitempty"`
	OnSuccess   *SuccessConditions     `json:"onSuccess,omitempty"`
	Name        string                 `json:"name"`
	Type        string                 `json:"type,omitempty"`
	Actions     []Action               `json:"actions"`
}

Stage represents a pipeline stage.

type StageState

type StageState struct {
	InboundTransitionState *StageTransitionState
	LatestExecution        map[string]any
	Conditions             map[string]any
	StageName              string
	ActionStates           []map[string]any
}

StageState represents the state of a pipeline stage.

type StageTransitionState

type StageTransitionState struct {
	PipelineName   string `json:"pipelineName"`
	StageName      string `json:"stageName"`
	TransitionType string `json:"transitionType"`
	Reason         string `json:"reason"`
	Disabled       bool   `json:"disabled"`
	// contains filtered or unexported fields
}

StageTransitionState holds the disabled state and reason for a pipeline stage transition.

type StartExecutionOptions

type StartExecutionOptions struct {
	Variables          map[string]string
	ClientRequestToken string
	SourceRevisions    []SourceRevision
}

StartExecutionOptions carries StartPipelineExecution's optional overrides.

type SuccessConditions

type SuccessConditions struct {
	Conditions []Condition `json:"conditions"`
}

SuccessConditions are the conditions a stage must meet to succeed.

type Tag

type Tag struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

Tag represents a key-value tag.

type TaggedEntry added in v1.3.1

type TaggedEntry struct {
	Tags map[string]string
	ARN  string
}

TaggedEntry pairs a resource ARN with its tags.

type Trigger

type Trigger struct {
	GitConfiguration *GitConfiguration `json:"gitConfiguration,omitempty"`
	ProviderType     string            `json:"providerType"`
}

Trigger represents a pipeline trigger definition.

type Webhook

type Webhook struct {
	// Tags is never marshaled into a real wire response (ListWebhooks/
	// PutWebhook build their own webhookListEntry view instead) but IS
	// marshaled by persistence.go's DTO Value, so this must stay visible to
	// json.Marshal or a Snapshot/Restore cycle silently drops the tags.
	Tags map[string]string `json:"tags,omitempty"`

	AuthenticationConfiguration WebhookAuthConfig `json:"authenticationConfiguration,omitzero"`
	Name                        string            `json:"name"`
	TargetPipeline              string            `json:"targetPipeline"`
	TargetAction                string            `json:"targetAction"`
	Authentication              string            `json:"authentication,omitempty"`
	URL                         string            `json:"url,omitempty"`
	ARN                         string            `json:"arn,omitempty"`
	LastTriggered               string            `json:"lastTriggered,omitempty"`
	Filters                     []WebhookFilter   `json:"filters,omitempty"`
	RegisteredWithThirdParty    bool              `json:"registeredWithThirdParty"`
	// contains filtered or unexported fields
}

Webhook represents a CodePipeline webhook with full AWS-parity fields.

type WebhookAuthConfig

type WebhookAuthConfig struct {
	SecretToken    string `json:"SecretToken,omitempty"`
	AllowedIPRange string `json:"AllowedIPRange,omitempty"`
}

WebhookAuthConfig holds the authentication configuration for a webhook. Real types.WebhookAuthConfiguration (awsAwsjson11_deserializeDocumentWebhookAuthConfiguration / awsAwsjson11_serializeDocumentWebhookAuthConfiguration) uses the capitalized wire keys "SecretToken"/"AllowedIPRange" -- unlike every other member of WebhookDefinition/ListWebhookItem, which are lowerCamelCase.

type WebhookFilter

type WebhookFilter struct {
	JSONPath    string `json:"jsonPath"`
	MatchEquals string `json:"matchEquals,omitempty"`
}

WebhookFilter represents a filter applied to incoming webhook payloads.

Jump to

Keyboard shortcuts

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