templating

package
v1.11.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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

func RenderString(value string, input map[string]any) (string, error)

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

func RenderStrings(target any, input map[string]any) error

RenderStrings walks structs, slices, and string maps to render templates in string values.

func RenderStringsWithContext

func RenderStringsWithContext(ctx context.Context, target any, input map[string]any) error

RenderStringsWithContext walks structs, slices, and string maps to render templates in string values using the supplied execution context.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL