Documentation
¶
Overview ¶
Package specworkflow provides spec workflow management and built-in workflow definitions.
Index ¶
- func BuiltInWorkflows() []*store.SpecWorkflow
- func DefaultWorkflowForType(initType string) string
- func Resolve(ctx context.Context, s store.SpecWorkflowStore, init *store.Initiative) (*store.SpecWorkflow, error)
- func SeedBuiltIn(ctx context.Context, s store.SpecWorkflowStore) (int, error)
- func SpecDir(initiativeID string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuiltInWorkflows ¶
func BuiltInWorkflows() []*store.SpecWorkflow
BuiltInWorkflows returns the default spec workflow definitions.
func DefaultWorkflowForType ¶
DefaultWorkflowForType returns the default workflow ID for an initiative type.
func Resolve ¶
func Resolve(ctx context.Context, s store.SpecWorkflowStore, init *store.Initiative) (*store.SpecWorkflow, error)
Resolve returns the workflow that applies to an initiative: its explicit WorkflowID override if set, otherwise the default for its type. It checks the store first, falling back to the built-in definitions so resolution works even before `workflow seed` has been run.
func SeedBuiltIn ¶
SeedBuiltIn creates the built-in workflows if they don't exist. Returns the number of workflows created.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.