Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Workflow ¶
type Workflow struct {
bun.BaseModel `bun:"table:workflows"`
ID uuid.UUID `bun:",pk,type:uuid" json:"id"`
// Slug is the human-facing workflow id — renameable, unlike ID.
Slug string `bun:",notnull,unique" json:"slug"`
// Version counts installed heads; it is 0 while only a draft exists.
Version int `json:"version"`
Spec string `json:"spec"`
Draft string `json:"draft,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
Workflow is a registry row: the workflow's permanent identity plus its current spec. Spec holds the installed YAML head and Draft holds a proposed spec awaiting an explicit save. A workflow that was composed but never saved has an empty Spec.
func GetWorkflowBySlug ¶
type WorkflowVersion ¶
type WorkflowVersion struct {
bun.BaseModel `bun:"table:workflow_versions"`
ID uuid.UUID `bun:",pk,type:uuid" json:"id"`
WorkflowID uuid.UUID `bun:"type:uuid,notnull" json:"workflow_id"`
Version int `bun:",notnull" json:"version"`
Spec string `bun:",notnull" json:"spec"`
CreatedAt time.Time `json:"created_at"`
}
WorkflowVersion is one immutable entry in a workflow's history. Every installed head gets a row, so any past version can be inspected or restored. Rows outlive their workflow — deleting a workflow does not rewrite the past.
func GetWorkflowVersion ¶
func ListWorkflowVersions ¶
func (*WorkflowVersion) Validate ¶
func (v *WorkflowVersion) Validate() error
Click to show internal directories.
Click to hide internal directories.