tmpl

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(name, tmplStr string, data map[string]any) (string, error)

Render parses and executes a Go template with custom functions. The data map is the dot context. The {{ username }} function returns the empty string; use RenderWithUsername to make a real identity available.

func RenderWithUsername added in v0.23.0

func RenderWithUsername(name, tmplStr string, data map[string]any, username string) (string, error)

RenderWithUsername is Render with the {{ username }} function bound to the supplied identity. The sync engine passes the OS account the secrets are laid out under (kv/users/<username>/...), so a rule template can build paths like /home/{{ username }}/.ssh/dotvault.sock without the username having to be a field in the Vault secret.

Types

This section is empty.

Jump to

Keyboard shortcuts

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