Help us shape the future of Go! Take the 2026 Go Developer Survey

codepipeline

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package codepipeline emulates AWS CodePipeline (JSON 1.1): V1 and V2 pipelines with variables and namespaces, and executions that run their stages through pogi's own services: S3 and ECR sources, CodeBuild builds, CloudFormation, S3, CodeDeploy and ECS deploys, manual approvals, and Lambda and Step Functions invokes. Webhooks and custom action types are metadata.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionRun

type ActionRun struct {
	ID            string            `json:"id"`
	Stage         string            `json:"stage"`
	Name          string            `json:"name"`
	Status        string            `json:"status"` // InProgress | Succeeded | Failed | Abandoned
	Summary       string            `json:"summary,omitempty"`
	External      string            `json:"external,omitempty"` // build, stack, deployment, job or execution
	Token         string            `json:"token,omitempty"`    // a manual approval's
	Job           string            `json:"job,omitempty"`      // a Lambda invoke's
	Result        string            `json:"result,omitempty"`   // what PutApprovalResult or PutJob*Result said
	ResultSummary string            `json:"resultSummary,omitempty"`
	Error         *errorDetails     `json:"error,omitempty"`
	Started       time.Time         `json:"started"`
	Updated       time.Time         `json:"updated"`
	Input         map[string]any    `json:"input"`
	Outputs       []artifact        `json:"outputs,omitempty"`
	Variables     map[string]string `json:"variables,omitempty"`
}

ActionRun is one execution of an action.

type Execution

type Execution struct {
	ID        string                       `json:"id"`
	Pipeline  string                       `json:"pipeline"`
	Version   int                          `json:"version"`
	Status    string                       `json:"status"` // InProgress | Stopping | Stopped | Succeeded | Failed
	Summary   string                       `json:"summary,omitempty"`
	Stopped   string                       `json:"stopped,omitempty"` // why it was stopped
	Mode      string                       `json:"mode"`
	Trigger   string                       `json:"trigger"`
	Started   time.Time                    `json:"started"`
	Updated   time.Time                    `json:"updated"`
	Stages    map[string]string            `json:"stages"`    // stage → status
	Actions   []*ActionRun                 `json:"actions"`   // oldest first
	Artifacts map[string]location          `json:"artifacts"` // artifact → where it is
	Outputs   map[string]map[string]string `json:"outputs"`   // namespace → variables; "variables" are the pipeline's
	Revisions []revision                   `json:"revisions,omitempty"`
}

Execution is a run of a pipeline.

type Pipeline

type Pipeline struct {
	Decl    map[string]any `json:"declaration"`
	Arn     string         `json:"arn"`
	Created time.Time      `json:"created"`
	Updated time.Time      `json:"updated"`
}

Pipeline is a pipeline's declaration, as given plus what CodePipeline fills in, and its metadata.

type Service

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

Service is the CodePipeline emulator.

func New

func New(hub *core.Hub) *Service

New creates the CodePipeline service.

func (*Service) Close

func (s *Service) Close() error

Close stops running executions.

func (*Service) Info

func (s *Service) Info() core.Info

func (*Service) Inspect

func (s *Service) Inspect(table, id string) any

func (*Service) Load

func (s *Service) Load(b []byte) error

Load restores pipelines and executions; executions that were running fail, as nothing runs them any more.

func (*Service) Reset

func (s *Service) Reset()

func (*Service) Resources

func (s *Service) Resources() []core.Table

func (*Service) Save

func (s *Service) Save() ([]byte, error)

func (*Service) ServeHTTP

func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Tag

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

Tag is a resource tag.

Jump to

Keyboard shortcuts

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