env

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package env implements environment variable templating.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func K8sTemplateFuncs added in v0.5.0

func K8sTemplateFuncs(cfg *config.Config, name names.Name, k8sClient *k8s.K8s) *k8sTemplateFuncs

Types

type TemplateFuncs added in v0.5.0

type TemplateFuncs interface {
	TxtFuncMap(ctx context.Context) template.FuncMap
}

TemplateFuncs gives a func map.

type Transformer

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

Transformer is used to to expand gotemplates in environment variables.

func NewTransformer added in v0.4.0

func NewTransformer(funcs ...TemplateFuncs) *Transformer

NewTransformer creates a new Transformer.

func (*Transformer) Get

func (trans *Transformer) Get(
	ctx context.Context,
	tplStr string,
) (string, error)

Get gets the expansion of a template.

Jump to

Keyboard shortcuts

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