Documentation
¶
Index ¶
- func ApplySchemaDefaults(schemaRaw []byte, input map[string]any) (map[string]any, error)
- func DecodeStoryRunInputs(storyRun *runsv1alpha1.StoryRun) (map[string]any, error)
- func MarshalStoryRunInputs(storyRun *runsv1alpha1.StoryRun) ([]byte, error)
- func ResolveStoryRunInputs(story *bubuv1alpha1.Story, storyRun *runsv1alpha1.StoryRun) (map[string]any, error)
- func ResolveStoryRunInputsBytes(story *bubuv1alpha1.Story, storyRun *runsv1alpha1.StoryRun) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplySchemaDefaults ¶
ApplySchemaDefaults applies JSON Schema "default" values to the provided input map. The returned map is a deep copy of the input with defaults applied.
func DecodeStoryRunInputs ¶
func DecodeStoryRunInputs(storyRun *runsv1alpha1.StoryRun) (map[string]any, error)
DecodeStoryRunInputs returns the StoryRun's spec.inputs as a map, defaulting to an empty map when the field is nil.
func MarshalStoryRunInputs ¶
func MarshalStoryRunInputs(storyRun *runsv1alpha1.StoryRun) ([]byte, error)
MarshalStoryRunInputs encodes spec.inputs into canonical JSON bytes so callers can inject the payload into env vars or template contexts.
func ResolveStoryRunInputs ¶
func ResolveStoryRunInputs(story *bubuv1alpha1.Story, storyRun *runsv1alpha1.StoryRun) (map[string]any, error)
ResolveStoryRunInputs returns StoryRun inputs with schema defaults applied. Defaults are pulled from Story.Spec.InputsSchema "default" values.
func ResolveStoryRunInputsBytes ¶
func ResolveStoryRunInputsBytes(story *bubuv1alpha1.Story, storyRun *runsv1alpha1.StoryRun) ([]byte, error)
ResolveStoryRunInputsBytes marshals resolved StoryRun inputs with schema defaults applied.
Types ¶
This section is empty.