parser

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormYAMLFromBytes

func FormYAMLFromBytes(def *ClientConfigDefault, bytes []byte, stateType string) (*types.FormYAML, error)

FormYAMLFromBytes generates a usable form yaml from raw form config and a set of default clients.

stateType refers to the types of state that should be read. The two state types are "live" and "declared" -- if stateType is "", this will read both live and declared states.

func GetFormFromRelease added in v0.10.0

func GetFormFromRelease(def *ClientConfigDefault, rel *release.Release) (*types.FormYAML, error)

GetFormFromRelease returns the form by parsing a release's files. Returns nil if the form is not found, throws an error if the form was found but there was a parsing error.

Types

type ClientConfigDefault

type ClientConfigDefault struct {
	DynamicClient dynamic.Interface

	HelmAgent   *helm.Agent
	HelmRelease *release.Release
	HelmChart   *chart.Chart
}

ClientConfigDefault is a set of default clients to be used if a context in form.yaml does not declare otherwise.

type ContextConfig

type ContextConfig struct {
	FromType       string   // "live" or "declared"
	Capabilities   []string // "read", "write"
	TemplateReader templater.TemplateReader
	TemplateWriter templater.TemplateWriter
}

ContextConfig can read/write from a specified context (data source)

Jump to

Keyboard shortcuts

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