tmpl

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(cr *CustomResource, dir string, w io.Writer) error

Parse will take a CustomResource, template directory and an io.Writer and print the resulting templates to the io.Writer

Types

type CustomResource

type CustomResource struct {
	Resource *unstructured.Unstructured // represents the resource from kubernetes
}

CustomResource provides some helper methods for interacting with the kubernetes custom resource inside the templates.

func (CustomResource) GetField

func (cr CustomResource) GetField(fields ...string) string

GetField will traverse all the fields to return the string value of the requested field. If the field is not found it will return an empty string

func (CustomResource) Name

func (cr CustomResource) Name() string

Name will return the Name from the custom resource

Jump to

Keyboard shortcuts

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