Documentation
¶
Index ¶
- func RenderJSON(payload json.RawMessage, input map[string]any) (json.RawMessage, error)
- func RenderJSONWithContext(ctx context.Context, payload json.RawMessage, input map[string]any) (json.RawMessage, error)
- func RenderString(value string, input map[string]any) (string, error)
- func RenderStringWithContext(ctx context.Context, value string, input map[string]any) (string, error)
- func RenderStrings(target any, input map[string]any) error
- func RenderStringsWithContext(ctx context.Context, target any, input map[string]any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderJSON ¶
func RenderJSON(payload json.RawMessage, input map[string]any) (json.RawMessage, error)
RenderJSON renders template placeholders across arbitrary JSON-compatible payloads and re-encodes the rendered value back into canonical JSON.
func RenderJSONWithContext ¶
func RenderJSONWithContext(ctx context.Context, payload json.RawMessage, input map[string]any) (json.RawMessage, error)
RenderJSONWithContext renders template placeholders across arbitrary JSON-compatible payloads with access to execution-runtime data on ctx.
func RenderString ¶
RenderString resolves {{template}} expressions against the provided input. Nested map paths and array indexes such as {{input.nodes[0].status}} are supported.
func RenderStringWithContext ¶
func RenderStringWithContext(ctx context.Context, value string, input map[string]any) (string, error)
RenderStringWithContext resolves {{template}} expressions against the provided input plus any execution-runtime data available on ctx.
func RenderStrings ¶
RenderStrings walks structs, slices, and string maps to render templates in string values.
Types ¶
This section is empty.