components

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const FailedOutputChannel = "failed"
View Source
const PassedOutputChannel = "passed"
View Source
const PayloadType = "semaphore.workflow.finished"
View Source
const PipelineResultPassed = "passed"
View Source
const PipelineStateDone = "done"
View Source
const PollInterval = 5 * time.Minute

Variables

View Source
var AllPipelineDoneResults = []configuration.FieldOption{
	{Label: "Passed", Value: "passed"},
	{Label: "Failed", Value: "failed"},
	{Label: "Stopped", Value: "stopped"},
	{Label: "Canceled", Value: "canceled"},
}

Functions

This section is empty.

Types

type GetPipeline

type GetPipeline struct{}

func (*GetPipeline) Cancel

func (c *GetPipeline) Cancel(ctx core.ExecutionContext) error

func (*GetPipeline) Cleanup

func (c *GetPipeline) Cleanup(ctx core.SetupContext) error

func (*GetPipeline) Color

func (c *GetPipeline) Color() string

func (*GetPipeline) Configuration

func (c *GetPipeline) Configuration() []configuration.Field

func (*GetPipeline) Description

func (c *GetPipeline) Description() string

func (*GetPipeline) Documentation

func (c *GetPipeline) Documentation() string

func (*GetPipeline) ExampleOutput

func (c *GetPipeline) ExampleOutput() map[string]any

func (*GetPipeline) Execute

func (c *GetPipeline) Execute(ctx core.ExecutionContext) error

func (*GetPipeline) HandleHook

func (c *GetPipeline) HandleHook(ctx core.ActionHookContext) error

func (*GetPipeline) HandleWebhook

func (*GetPipeline) Hooks

func (c *GetPipeline) Hooks() []core.Hook

func (*GetPipeline) Icon

func (c *GetPipeline) Icon() string

func (*GetPipeline) Label

func (c *GetPipeline) Label() string

func (*GetPipeline) Name

func (c *GetPipeline) Name() string

func (*GetPipeline) OutputChannels

func (c *GetPipeline) OutputChannels(configuration any) []core.OutputChannel

func (*GetPipeline) ProcessQueueItem

func (c *GetPipeline) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*GetPipeline) Setup

func (c *GetPipeline) Setup(ctx core.SetupContext) error

type GetPipelineSpec

type GetPipelineSpec struct {
	PipelineID string `json:"pipelineId" mapstructure:"pipelineId"`
}

type OnPipelineDone

type OnPipelineDone struct{}

func (*OnPipelineDone) Cleanup

func (p *OnPipelineDone) Cleanup(ctx core.TriggerContext) error

func (*OnPipelineDone) Color

func (p *OnPipelineDone) Color() string

func (*OnPipelineDone) Configuration

func (p *OnPipelineDone) Configuration() []configuration.Field

func (*OnPipelineDone) Description

func (p *OnPipelineDone) Description() string

func (*OnPipelineDone) Documentation

func (p *OnPipelineDone) Documentation() string

func (*OnPipelineDone) ExampleData

func (t *OnPipelineDone) ExampleData() map[string]any

func (*OnPipelineDone) HandleHook

func (p *OnPipelineDone) HandleHook(ctx core.TriggerHookContext) (map[string]any, error)

func (*OnPipelineDone) HandleWebhook

func (*OnPipelineDone) Hooks

func (p *OnPipelineDone) Hooks() []core.Hook

func (*OnPipelineDone) Icon

func (p *OnPipelineDone) Icon() string

func (*OnPipelineDone) Label

func (p *OnPipelineDone) Label() string

func (*OnPipelineDone) Name

func (p *OnPipelineDone) Name() string

func (*OnPipelineDone) Setup

func (p *OnPipelineDone) Setup(ctx core.TriggerContext) error

type OnPipelineDoneConfiguration

type OnPipelineDoneConfiguration struct {
	Project   string                    `json:"project" mapstructure:"project"`
	Refs      []configuration.Predicate `json:"refs" mapstructure:"refs"`
	Results   []string                  `json:"results" mapstructure:"results"`
	Pipelines []configuration.Predicate `json:"pipelines" mapstructure:"pipelines"`
}

type OnPipelineDoneMetadata

type OnPipelineDoneMetadata struct {
	Project *Project `json:"project"`
}

type Parameter

type Parameter struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type PipelineMetadata

type PipelineMetadata struct {
	ID     string `json:"id"`
	State  string `json:"state"`
	Result string `json:"result"`
}

type Project

type Project struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	URL  string `json:"url"`
}

type RunWorkflow

type RunWorkflow struct{}

func (*RunWorkflow) Cancel

func (r *RunWorkflow) Cancel(ctx core.ExecutionContext) error

func (*RunWorkflow) Cleanup

func (r *RunWorkflow) Cleanup(ctx core.SetupContext) error

func (*RunWorkflow) Color

func (r *RunWorkflow) Color() string

func (*RunWorkflow) Configuration

func (r *RunWorkflow) Configuration() []configuration.Field

func (*RunWorkflow) Description

func (r *RunWorkflow) Description() string

func (*RunWorkflow) Documentation

func (r *RunWorkflow) Documentation() string

func (*RunWorkflow) ExampleOutput

func (c *RunWorkflow) ExampleOutput() map[string]any

func (*RunWorkflow) Execute

func (r *RunWorkflow) Execute(ctx core.ExecutionContext) error

func (*RunWorkflow) HandleHook

func (r *RunWorkflow) HandleHook(ctx core.ActionHookContext) error

func (*RunWorkflow) HandleWebhook

func (*RunWorkflow) Hooks

func (r *RunWorkflow) Hooks() []core.Hook

func (*RunWorkflow) Icon

func (r *RunWorkflow) Icon() string

func (*RunWorkflow) Label

func (r *RunWorkflow) Label() string

func (*RunWorkflow) Name

func (r *RunWorkflow) Name() string

func (*RunWorkflow) OutputChannels

func (r *RunWorkflow) OutputChannels(configuration any) []core.OutputChannel

func (*RunWorkflow) ProcessQueueItem

func (r *RunWorkflow) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*RunWorkflow) Setup

func (r *RunWorkflow) Setup(ctx core.SetupContext) error

type RunWorkflowExecutionMetadata

type RunWorkflowExecutionMetadata struct {
	Workflow *WorkflowMetadata `json:"workflow" mapstructure:"workflow"`
	Pipeline *PipelineMetadata `json:"pipeline" mapstructure:"pipeline"`
	Extra    map[string]any    `json:"extra,omitempty" mapstructure:"extra,omitempty"`
}

type RunWorkflowNodeMetadata

type RunWorkflowNodeMetadata struct {
	Project *Project `json:"project" mapstructure:"project"`
}

type RunWorkflowSpec

type RunWorkflowSpec struct {
	Project      string      `json:"project"`
	Ref          string      `json:"ref"`
	PipelineFile string      `json:"pipelineFile"`
	CommitSha    string      `json:"commitSha"`
	Parameters   []Parameter `json:"parameters"`
}

type WorkflowMetadata

type WorkflowMetadata struct {
	ID  string `json:"id"`
	URL string `json:"url"`
}

Jump to

Keyboard shortcuts

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