dynamicvars

package
v0.50.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package dynamicvars resolves {{$name}} template variables to generated fake data. The {{$...}} namespace is owned here; generators are backed by gofakeit for breadth and by hand for the validity-critical financial ones (IBAN, BIC), so e.g. {{$iban:FR}} passes a real mod-97 check.

Determinism: a Context is seeded from the execution id, so a given execution produces a stable stream of values and different executions differ. Draws are mutex-guarded; under concurrent node execution the draw order (and thus the exact values) can vary between runs — values are guaranteed unique-per-run, not yet identical on replay. See docs/dynamic-template-variables-design.md.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	// contains filtered or unexported fields
}

Context holds the per-execution generator state.

func New

func New(executionID string) *Context

New builds a Context seeded deterministically from the execution id.

func (*Context) Resolve

func (c *Context) Resolve(name string, args []string) (string, error)

Resolve returns the value for $name with optional colon-separated args. It implements the resolver interface the node package expects.

type Entry

type Entry struct {
	Name     string
	Category string
	Desc     string
	Example  string
	// contains filtered or unexported fields
}

Entry documents one generator. Desc and Example feed `flows vars` / docs.

func Catalog

func Catalog() []Entry

Catalog returns every generator, sorted by category then name, for documentation and discovery by users and AI agents.

Jump to

Keyboard shortcuts

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