templates

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: Apache-2.0 Imports: 19 Imported by: 5 modules, 9 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdvancedTemplateFuncMap

func AdvancedTemplateFuncMap(config *rest.Config, logger logr.Logger) template.FuncMap

AdvancedTemplateFuncMap to add Sprig and additional templating functions

func IsJSONArray

func IsJSONArray(data []byte) bool

IsJSONArray checks to see if a byte array containing JSON is an array of data

func NewLookupFunction

func NewLookupFunction(config *rest.Config, logger logr.Logger) lookupFunc

NewLookupFunction get information at runtime from cluster

func ProcessTemplate

func ProcessTemplate(context context.Context, data interface{}, template *template.Template) (*unstructured.Unstructured, error)

ProcessTemplate processes an initialized Go template with a set of data. It expects one API object to be defined in the template requires a context with log

func ProcessTemplateArray

func ProcessTemplateArray(context context.Context, data interface{}, template *template.Template) ([]unstructured.Unstructured, error)

ProcessTemplateArray processes an initialized Go template with a set of data. It expects an arrays of API objects to be defined in the template. Dishomogeneus types are supported requires a context with log

func ValidateUnstructured

func ValidateUnstructured(context context.Context, obj *unstructured.Unstructured, validationSchema *validation.SchemaValidation) error

ValidateUnstructured validates the content of an unstructured against an openapi schema. the schema is intended to be retrieved from a running instance of kubernetes, but other usages are possible. requires a context with log

Types

This section is empty.

Jump to

Keyboard shortcuts

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