Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PackTemplateContext ¶
type PackTemplateContext = parser.PackTemplateContext
type Rendered ¶
type Rendered struct {
// contains filtered or unexported fields
}
Rendered encapsulates all the rendered template files associated with the pack. It splits them based on whether they belong to the parent or a dependency.
func (*Rendered) DependentRenders ¶
DependentRenders returns a map of rendered templates belonging to the dependent packs of the parent template. The map key represents the path and file name of the template.
func (*Rendered) LenDependentRenders ¶
LenDependentRenders returns the number of dependent rendered templates that are stored.
func (*Rendered) LenParentRenders ¶
LenParentRenders returns the number of parent rendered templates that are stored.
func (*Rendered) ParentRenders ¶
ParentRenders returns a map of rendered templates belonging to the parent pack. The map key represents the path and file name of the template.
type Renderer ¶
type Renderer struct { // Strict determines the template rendering missingkey option setting. If // set to true error will be used, otherwise zero is used. Strict bool // Client is the Nomad API client used when running the Nomad template // functions. It can potentially be nil, therefore care should be taken // when accessing it. Client *api.Client // RenderAuxFiles determines whether we should render auxiliary files found // in template/ or not RenderAuxFiles bool // Format determines whether we should format templates before rendering them // or not Format bool // contains filtered or unexported fields }
Renderer provides template rendering functionality using the text/template package.
func (*Renderer) Render ¶
Render is responsible for iterating the pack and rendering each defined template using the parsed variable map.
func (*Renderer) RenderOutput ¶
RenderOutput performs the output template rendering.