types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	// Required. The integration that this uses.
	IntegrationID string

	// Required. The verb to perform.
	Verb string

	// Optional. A way to unique identify the step.
	Subresource string
}

func ParseActionID

func ParseActionID(actionID string) (Action, error)

ParseActionID parses an action ID into its constituent parts.

func (Action) IntegrationVerbString

func (o Action) IntegrationVerbString() string

func (Action) String

func (o Action) String() string

type RandomScheduleOpt

type RandomScheduleOpt string
const (
	Random15Min  RandomScheduleOpt = "random_15_min"
	RandomHourly RandomScheduleOpt = "random_hourly"
	RandomDaily  RandomScheduleOpt = "random_daily"
)

type WorkflowEvent

type WorkflowEvent struct {
	Name string `yaml:"name"`
}

type WorkflowFile

type WorkflowFile struct {
	Name string `yaml:"name"`

	On WorkflowOn `yaml:"on"`

	Jobs map[string]WorkflowJob `yaml:"jobs"`
}

func ParseYAML

func ParseYAML(ctx context.Context, yamlBytes []byte) (WorkflowFile, error)

func (*WorkflowFile) GetJobByName

func (w *WorkflowFile) GetJobByName(name string) *WorkflowJob

func (*WorkflowFile) ListJobNames

func (w *WorkflowFile) ListJobNames() []string

type WorkflowJob

type WorkflowJob struct {
	Queue string `yaml:"queue"`

	Timeout string `yaml:"timeout"`

	Steps []WorkflowStep `yaml:"steps"`
}

type WorkflowNode

type WorkflowNode struct {
	Name     string
	Children []*WorkflowNode
}

func (*WorkflowNode) AddNode

func (t *WorkflowNode) AddNode(name string) error

type WorkflowOn

type WorkflowOn struct {
	Events []string       `yaml:"events"`
	Cron   WorkflowOnCron `yaml:"cron"`
}

type WorkflowOnCron

type WorkflowOnCron struct {
	Schedule string `yaml:"schedule"`
}

type WorkflowStep

type WorkflowStep struct {
	Name     string                 `yaml:"name"`
	ID       string                 `yaml:"id"`
	ActionID string                 `yaml:"actionId"`
	Timeout  string                 `yaml:"timeout"`
	With     map[string]interface{} `yaml:"with,omitempty"`
}

type WorkflowTree

type WorkflowTree struct {
	RootWorkflows []*WorkflowNode
}

func NewWorkflowTree

func NewWorkflowTree() *WorkflowTree

func ParseWorkflowTreeFromFile

func ParseWorkflowTreeFromFile(file WorkflowFile) (*WorkflowTree, error)

func (*WorkflowTree) AddRootNode

func (t *WorkflowTree) AddRootNode(name string)

Jump to

Keyboard shortcuts

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