tmpl

package
v0.38.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFileRenderer added in v0.25.2

func NewFileRenderer(readFile func(filename string) ([]byte, error), basePath string, env environment.Environment, namespace string) *templateFileRenderer

func NewFirstPassRenderer added in v0.34.0

func NewFirstPassRenderer(basePath string, env environment.Environment) *templateFileRenderer

func NewTextRenderer added in v0.37.0

func NewTextRenderer(readFile func(filename string) ([]byte, error), basePath string, data interface{}) *templateTextRenderer

func RequiredEnv

func RequiredEnv(name string) (string, error)

func ToYaml

func ToYaml(v interface{}) (string, error)

Types

type Context

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

func (*Context) Exec added in v0.30.0

func (c *Context) Exec(command string, args []interface{}, inputs ...string) (string, error)

func (*Context) ReadFile

func (c *Context) ReadFile(filename string) (string, error)

func (*Context) RenderTemplateToBuffer

func (c *Context) RenderTemplateToBuffer(s string, data ...interface{}) (*bytes.Buffer, error)

type FileRenderer added in v0.25.2

type FileRenderer interface {
	RenderTemplateFileToBuffer(file string) (*bytes.Buffer, error)
}

type TemplateData added in v0.28.0

type TemplateData struct {
	// Environment is accessible as `.Environment` from any template executed by the renderer
	Environment environment.Environment
	// Namespace is accessible as `.Namespace` from any non-values template executed by the renderer
	Namespace string
}

type TextRenderer added in v0.37.0

type TextRenderer interface {
	RenderTemplateText(text string) (string, error)
}

type Values

type Values = map[string]interface{}

func FromYaml

func FromYaml(str string) (Values, error)

func SetValueAtPath

func SetValueAtPath(path string, value interface{}, values Values) (Values, error)

Jump to

Keyboard shortcuts

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