Documentation
¶
Overview ¶
Package workflowschema provides conversion functions between the WorkflowSchema (parser/DS model) and RemediationWorkflowSpec (CRD API type).
RF-4: These two types are structurally near-identical but differ in how they represent freeform data (interface{} vs *apiextensionsv1.JSON) and nullability (pointer vs value for execution/dependencies). This converter bridges the gap.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SchemaToSpec ¶
func SchemaToSpec(schema *models.WorkflowSchema) (*rwv1alpha1.RemediationWorkflowSpec, error)
SchemaToSpec converts a DS WorkflowSchema model to a CRD RemediationWorkflowSpec. The caller must set CRD metadata.name = schema.WorkflowName separately. Used when populating CRD objects from parsed workflow schemas.
func SpecToSchema ¶
func SpecToSchema(workflowName string, spec rwv1alpha1.RemediationWorkflowSpec) (*models.WorkflowSchema, error)
SpecToSchema converts a CRD RemediationWorkflowSpec to the DS WorkflowSchema model. workflowName is derived from the CRD's metadata.name (no longer in spec per #329). Used by the AW handler when forwarding CRD content to DS for registration.
Types ¶
This section is empty.