Documentation
¶
Overview ¶
Package processor contains an interface for all processing and implementations of the processors which mangle the yaml
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrDisabledProcessor = errors.New("internal Error: attempt to use disabled processor")
ErrDisabledProcessor is the error to return when attempting to use a disabled processor
Functions ¶
func MergeYaml ¶
MergeYaml performs a json patch and a strategic merge, both if needed to some yaml on disk Performs the strategic merge FIRST, followed by the json patch. This is supposed to be Kubernetes strategic merge and RFC6902 patching Accepts these patches as yaml. Will write a file to disk from these if the file does not already exist, strategic merge patching an on disk file will effectively create it.
Types ¶
type Dependencies ¶
type Dependencies struct {
Dependencies []Dependency `yaml:"dependencies"`
}
Dependencies is a list of repositories that this chart is dependent upon
type Dependency ¶
Dependency is one repository that this chart is dependent upon
type HelmProcessor ¶
type HelmProcessor struct{}
HelmProcessor handles Chart,yaml files via helm
func (HelmProcessor) Enabled ¶
func (HelmProcessor) Enabled(_ string, path string) bool
Enabled returns true only if this proessor can do work
func (HelmProcessor) Name ¶
func (HelmProcessor) Name() string
Name returns a string for the plugin's name
type HelmfileProcessor ¶
type HelmfileProcessor struct{}
HelmfileProcessor handles Chart,yaml files via helm
func (HelmfileProcessor) Enabled ¶
func (HelmfileProcessor) Enabled(_ string, path string) bool
Enabled returns true only if this proessor can do work
func (HelmfileProcessor) Name ¶
func (HelmfileProcessor) Name() string
Name returns a string for the plugin's name
type KustomizeProcessor ¶
type KustomizeProcessor struct{}
KustomizeProcessor handles kustomization.yaml via kustomize
func (KustomizeProcessor) Enabled ¶
func (KustomizeProcessor) Enabled(_ string, path string) bool
Enabled returns true only if this proessor can do work
func (KustomizeProcessor) Name ¶
func (KustomizeProcessor) Name() string
Name returns a string for the plugin's name
type PluginProcessor ¶
type PluginProcessor struct{}
PluginProcessor runs post processing plugins on a stream of yaml text
func (PluginProcessor) Enabled ¶
func (PluginProcessor) Enabled(basePath string, path string) bool
Enabled returns true only if this proessor can do work
func (PluginProcessor) Name ¶
func (PluginProcessor) Name() string
Name returns a string for the plugin's name
type PreProcessor ¶
type PreProcessor struct{}
PreProcessor is not a strict processor, as it handles files on disk
func (PreProcessor) Enabled ¶
func (PreProcessor) Enabled(basePath string, path string) bool
Enabled returns true only if this proessor can do work
func (PreProcessor) Generate ¶
func (v PreProcessor) Generate(basePath string, path string) error
Generate create the text stream for this plugin
func (PreProcessor) Name ¶
func (PreProcessor) Name() string
Name returns a string for the plugin's name
type Processor ¶
type Processor interface { Name() string Enabled(basePath string, path string) bool Generate(input *string, basePath string, path string) (*string, error) }
Processor interface is the interface for all processing engines name - name of processor for display and selection purposes enabled - does this processor believe it has work to do generate - call this to invoke main phase on this processor Historically we had an init phase, which has been removed
type YamlProcessor ¶
type YamlProcessor struct {
// contains filtered or unexported fields
}
YamlProcessor is the fallback processor for gathering plain yaml files
func (YamlProcessor) Enabled ¶
func (YamlProcessor) Enabled(_ string, _ string) bool
Enabled returns true only if this proessor can do work
func (YamlProcessor) Name ¶
func (YamlProcessor) Name() string
Name returns a string for the plugin's name