Documentation
¶
Index ¶
- func Load(filePath string) ([]byte, error)
- func Parse(source []byte) (runtime.Object, error)
- func ParseParameters(tpl []byte) ([]openshiftApi.Parameter, error)
- func ProcessTemplate(templatePath string, variables map[string]string) ([]byte, error)
- func ProcessTemplateUsingEnvVars(templatePath string) ([]byte, error)
- type DecodeFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Load ¶
Load loads file asset into byte array
Assets from given directory are added to the final binary through go-bindata code generation
func ParseParameters ¶
func ParseParameters(tpl []byte) ([]openshiftApi.Parameter, error)
ParseParameters parses parameters defined in the template
func ProcessTemplate ¶
ProcessTemplate applies variables defined in the passed map to the
func ProcessTemplateUsingEnvVars ¶
ProcessTemplateUsingEnvVars takes template path, loads its content and substitutes variables by using those which are defined as environment variables. Returns processed template as byte array
Types ¶
type DecodeFunc ¶
type DecodeFunc func(data []byte, defaults *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error)
DecodeFunc is a function type matching Decoder function from k8s runtime apimachinery.
func Decoder ¶
func Decoder() (DecodeFunc, error)
Decoder registers required schemas containing objects to be deserialize from YAML and constructs decode function to be applied on the source YAML