templater

package
v0.19.3 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendYamlResources

func AppendYamlResources(resources ...[]byte) []byte

func Execute

func Execute(templateContent string, data interface{}) ([]byte, error)

func ObjectsToYaml added in v0.8.0

func ObjectsToYaml(objs ...runtime.Object) ([]byte, error)

Types

type PartialYaml

type PartialYaml map[string]interface{}

func (PartialYaml) AddIfNotZero

func (p PartialYaml) AddIfNotZero(k string, v interface{})

func (PartialYaml) ToYaml

func (p PartialYaml) ToYaml() (string, error)

type Templater

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

func New

func New(writer filewriter.FileWriter) *Templater

func (*Templater) WriteBytesToFile

func (t *Templater) WriteBytesToFile(content []byte, fileName string, f ...filewriter.FileOptionsFunc) (filePath string, err error)

func (*Templater) WriteToFile

func (t *Templater) WriteToFile(templateContent string, data interface{}, fileName string, f ...filewriter.FileOptionsFunc) (filePath string, err error)

Jump to

Keyboard shortcuts

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