workflowcontract

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: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SupportedWorkflowVersion = "v1alpha1"
	BuiltInStepAPIVersion    = "deck/v1alpha1"
)
View Source
const (
	WhenLanguage = "CEL"
)

Variables

This section is empty.

Functions

func DefaultStepAPIVersionForWorkflowVersion

func DefaultStepAPIVersionForWorkflowVersion(version string) (string, bool)

func IsPublicWhenNamespace

func IsPublicWhenNamespace(root string) bool

func IsSupportedStepAPIVersion

func IsSupportedStepAPIVersion(apiVersion string) bool

func RegisterDescription

func RegisterDescription() string

func RegisterExample

func RegisterExample() string

func ResolveStepAPIVersion

func ResolveStepAPIVersion(workflowVersion, stepAPIVersion string) (string, error)

func SupportedWorkflowVersions

func SupportedWorkflowVersions() []string

func WhenDescription

func WhenDescription() string

func WhenExample

func WhenExample() string

func WhenNamespaces

func WhenNamespaces() []string

Types

type BuiltInTypeDefinition

type BuiltInTypeDefinition struct {
	Key    StepTypeKey
	Step   StepDefinition
	Docs   ToolMetadata
	Schema SchemaMetadata
}

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 struct {
	Description string
	Example     string
}

type OutputRootConstraint added in v0.2.3

type OutputRootConstraint struct {
	Path    string
	Root    string
	Example string
}

type ParallelMetadata added in v0.2.3

type ParallelMetadata struct {
	ApplySafe        bool
	ApplyTargetPaths []string
	PrepareOutput    OutputRootConstraint
}

type SchemaMetadata

type SchemaMetadata struct {
	GeneratorName string
	SpecType      any
	Patch         func(root map[string]any)
}

type StepDefinition

type StepDefinition struct {
	APIVersion          string
	Kind                string
	Family              string
	FamilyTitle         string
	Group               string
	GroupOrder          int
	DocsPage            string
	DocsOrder           int
	SchemaFile          string
	ToolSchemaGenerator string
	Visibility          string
	Category            string
	Summary             string
	WhenToUse           string
	Roles               []string
	Outputs             []string
	Parallel            ParallelMetadata
}

func StepDefinitionForKey

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

func StepDefinitions

func StepDefinitions() ([]StepDefinition, error)

type StepTypeKey

type StepTypeKey struct {
	APIVersion string
	Kind       string
}

type ToolMetadata

type ToolMetadata struct {
	Kind      string
	Category  string
	Summary   string
	WhenToUse string
	Example   string
	FieldDocs map[string]FieldDoc
	Notes     []string
}

Jump to

Keyboard shortcuts

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