Documentation
¶
Overview ¶
Package policy applies policy admission to the functions a Go template can call: every function and namespace is wrapped so a call is admitted against the template file it came from, and functions that read files, URLs or other sources confine those reads to what the policy allows.
Index ¶
Constants ¶
const Engine = "go-template"
Engine is the template engine name reported to policy admission.
Variables ¶
This section is empty.
Functions ¶
func Datasource ¶
func FuncsWrapper ¶
func FuncsWrapper(file string) render.FuncsWrapper
FuncsWrapper returns the template engine hook that applies policy admission to every function a template rendered from file can call, reading datasources through the render's own definitions.
Types ¶
type SourceFileBinder ¶
SourceFileBinder is implemented by a template namespace (Atmos's `atmos` namespace) that performs its own admission checks: it returns a copy bound to the template file the calls come from, so those checks attribute each call to the right file.