workflowexec

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyRegister

func ApplyRegister(step config.Step, outputs map[string]any, runtimeVars map[string]any, missingErrCode string) error

func DecodeSpec

func DecodeSpec[T any](spec map[string]any) (T, error)

func DetectHostFacts

func DetectHostFacts(goos string, goarch string, readFile HostFactsReader) map[string]any

func EvaluateWhen

func EvaluateWhen(expr string, vars map[string]any, runtime map[string]any, errCode string) (bool, error)

func EvaluateWhenWithContext added in v0.2.6

func EvaluateWhenWithContext(expr string, vars map[string]any, runtime map[string]any, context map[string]any, errCode string) (bool, error)

func FindPhase

func FindPhase(wf *config.Workflow, name string) (config.Phase, bool)

func IsReservedRuntimeVar

func IsReservedRuntimeVar(runtimeKey string) bool

func MustStepRoleHandlers added in v0.2.3

func MustStepRoleHandlers[T any](role string, handlers map[string]T) map[string]T

func RenderSpec

func RenderSpec(spec map[string]any, wf *config.Workflow, runtimeVars map[string]any, ctxData map[string]any) (map[string]any, error)

func RenderSpecWithExtra

func RenderSpecWithExtra(spec map[string]any, wf *config.Workflow, runtimeVars map[string]any, ctxData map[string]any, extra map[string]any) (map[string]any, error)

func ResolveWholeValueTemplate

func ResolveWholeValueTemplate(input string, ctx map[string]any) (any, bool, error)

func StepAllowedForRoleForKey

func StepAllowedForRoleForKey(role string, key StepTypeKey) (bool, error)

func StepHasOutputForKey

func StepHasOutputForKey(key StepTypeKey, output string) (bool, error)

func StepKinds

func StepKinds() ([]string, error)

func StepKindsForRole added in v0.2.2

func StepKindsForRole(role string) []string

func StepRoleHandlerForKey added in v0.2.3

func StepRoleHandlerForKey[T any](role string, handlers map[string]T, key StepTypeKey) (T, bool, error)

func StepRoleHandlers added in v0.2.3

func StepRoleHandlers[T any](role string, handlers map[string]T) (map[string]T, error)

func StepSchemaFileForKey

func StepSchemaFileForKey(key StepTypeKey) (string, bool, error)

Types

type BuiltInTypeDefinition

type BuiltInTypeDefinition = workflowcontract.BuiltInTypeDefinition

func BuiltInTypeDefinitionForKey

func BuiltInTypeDefinitionForKey(key StepTypeKey) (BuiltInTypeDefinition, bool, error)

func BuiltInTypeDefinitionForKeyWith added in v0.2.0

func BuiltInTypeDefinitionForKeyWith(key StepTypeKey, toolBuilder func(StepDefinition) ToolMetadata, schemaBuilder func(StepDefinition) (SchemaMetadata, error)) (BuiltInTypeDefinition, bool, error)

func BuiltInTypeDefinitions

func BuiltInTypeDefinitions() ([]BuiltInTypeDefinition, error)

func BuiltInTypeDefinitionsWith added in v0.2.0

func BuiltInTypeDefinitionsWith(toolBuilder func(StepDefinition) ToolMetadata, schemaBuilder func(StepDefinition) (SchemaMetadata, error)) ([]BuiltInTypeDefinition, error)

type FieldDoc

type FieldDoc = workflowcontract.FieldDoc

These aliases keep schema/documentation callers on the workflowexec facade when they need runtime step keys and contract projections together.

type HostFactsReader

type HostFactsReader func(string) ([]byte, error)

type RuntimeFieldDefinition added in v0.2.6

type RuntimeFieldDefinition struct {
	Path        string
	Type        string
	Description string
}

func RuntimeHostFieldDefinitions added in v0.2.6

func RuntimeHostFieldDefinitions() []RuntimeFieldDefinition

type SchemaMetadata

type SchemaMetadata = workflowcontract.SchemaMetadata

type StepBatch

type StepBatch struct {
	PhaseName      string
	ParallelGroup  string
	MaxParallelism int
	Steps          []config.Step
}

func BuildPhaseBatches

func BuildPhaseBatches(phase config.Phase) []StepBatch

func (StepBatch) Parallel

func (b StepBatch) Parallel() bool

type StepDefinition

type StepDefinition = workflowcontract.StepDefinition

StepDefinition is re-exported so runtime packages can use workflowexec as the facade for step keys, role checks, and dispatch registration.

func StepDefinitionForKey

func StepDefinitionForKey(key StepTypeKey) (StepDefinition, bool, error)

func StepDefinitions

func StepDefinitions() ([]StepDefinition, error)

type StepTypeKey

type StepTypeKey = workflowcontract.StepTypeKey

func ResolveStepTypeKey

func ResolveStepTypeKey(workflowVersion, stepAPIVersion, kind string) (StepTypeKey, error)

type ToolMetadata

type ToolMetadata = workflowcontract.ToolMetadata

Jump to

Keyboard shortcuts

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