{"modulePath":"github.com/devth/helm","version":"v2.0.0-alpha.2.0.20160816162624-120256ecb3a5+incompatible","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package engine\n\nPackage engine implements the Go template engine as a Tiller Engine.\n\nTiller provides a simple interface for taking a Chart and rendering its templates. The 'engine' package implements this interface using Go's built-in 'text/template' package.\n\n## Types\n\n```go\ntype Engine struct {\n\t// FuncMap contains the template functions that will be passed to each\n\t// render call. This may only be modified before the first call to Render.\n\tFuncMap template.FuncMap\n\t// If strict is enabled, template rendering will fail if a template references\n\t// a value that was not passed in.\n\tStrict bool\n}\n```\nEngine is an implementation of 'cmd/tiller/environment'.Engine that uses Go templates.\n\n```go\nfunc New() *Engine\n```\nNew creates a new Go template Engine instance.\n\nThe FuncMap is initialized here. You may modify the FuncMap \\_prior to\\_ the first invocation of Render.\n\nThe FuncMap sets all of the Sprig functions except for those that provide access to the underlying OS (env, expandenv).\n\n```go\nfunc (e *Engine) Render(chrt *chart.Chart, values chartutil.Values) (map[string]string, error)\n```\nRender takes a chart, optional values, and value overrids, and attempts to render the Go templates.\n\nRender can be called repeatedly on the same engine.\n\nThis will look in the chart's 'templates' data (e.g. the 'templates/' directory) and attempt to render the templates there using the values passed in.\n\nValues are scoped to their templates. A dependency template will not have access to the values set for its parent. If chart \"foo\" includes chart \"bar\", \"bar\" will not have access to the values for \"foo\".\n\nValues should be prepared with something like \\`chartutils.ReadValues\\`.\n\nValues are passed through the templates according to scope. If the top layer chart includes the chart foo, which includes the chart bar, the values map will be examined for a table called \"foo\". If \"foo\" is found in vals, that section of the values will be passed into the \"foo\" chart. And if that section contains a value named \"bar\", that value will be passed on to the bar chart during render time.\n\n","path":"github.com/devth/helm/pkg/engine","name":"engine","synopsis":"Package engine implements the Go template engine as a Tiller Engine.","isRedistributable":true}
