Documentation ¶
Overview ¶
Package yamlprocessor ...
Package yamlprocessor ...
Index ¶
- type DefinitionParser
- type YTTDefinitionParser
- type YTTProcessor
- func (p *YTTProcessor) GetClusterClassTemplateName(version, name string) string
- func (p *YTTProcessor) GetTemplateName(version, plan string) string
- func (p *YTTProcessor) GetVariableMap(rawArtifact []byte) (map[string]*string, error)
- func (p *YTTProcessor) GetVariables(rawArtifact []byte) ([]string, error)
- func (p *YTTProcessor) Process(rawArtifact []byte, variablesClient func(string) (string, error)) ([]byte, error)
- type YttDefinitionParserOpts
- type YttProcessorOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefinitionParser ¶
type DefinitionParser interface { // ParsePath returns the path specified within the template definition. ParsePath([]byte) ([]v1alpha1.PathInfo, error) }
DefinitionParser provides behavior to process template definition
type YTTDefinitionParser ¶
type YTTDefinitionParser struct {
// contains filtered or unexported fields
}
YTTDefinitionParser is a struct for parsing ytt definitions
func NewYttDefinitionParser ¶
func NewYttDefinitionParser(opts ...YttDefinitionParserOpts) *YTTDefinitionParser
NewYttDefinitionParser returns a YTTDefinitionParser
type YTTProcessor ¶
type YTTProcessor struct {
// contains filtered or unexported fields
}
YTTProcessor a type for processing and parsing ytt files.
func NewYttProcessor ¶
func NewYttProcessor(opts ...YttProcessorOption) *YTTProcessor
NewYttProcessor returns an instance of the YTTProcessor.
func NewYttProcessorWithConfigDir ¶
func NewYttProcessorWithConfigDir(configDir string) *YTTProcessor
NewYttProcessorWithConfigDir returns an instance of the YTTProcessor configured with tkg config directory
func (*YTTProcessor) GetClusterClassTemplateName ¶
func (p *YTTProcessor) GetClusterClassTemplateName(version, name string) string
GetClusterClassTemplateName returns the file name of the cluster class template that needs to be retrieved from the source.
func (*YTTProcessor) GetTemplateName ¶
func (p *YTTProcessor) GetTemplateName(version, plan string) string
GetTemplateName returns the name of the template definition file for the specified version and plan.
func (*YTTProcessor) GetVariableMap ¶
func (p *YTTProcessor) GetVariableMap(rawArtifact []byte) (map[string]*string, error)
GetVariableMap returns a map of the variables specified in the yaml.
func (*YTTProcessor) GetVariables ¶
func (p *YTTProcessor) GetVariables(rawArtifact []byte) ([]string, error)
GetVariables returns a list of the variables specified from the ytt data values.
type YttDefinitionParserOpts ¶
type YttDefinitionParserOpts func(*YTTDefinitionParser)
YttDefinitionParserOpts a type for defining functions that modify the ytt parser
func InjectTKGDir ¶
func InjectTKGDir(path string) YttDefinitionParserOpts
InjectTKGDir is a YttDefinitionParserOpts that allows the tkg directory to be overridden.
type YttProcessorOption ¶
type YttProcessorOption func(*YTTProcessor)
YttProcessorOption is a type that mutates ytt based on options defined in the option
func InjectDefinitionParser ¶
func InjectDefinitionParser(dp DefinitionParser) YttProcessorOption
InjectDefinitionParser is a YttProcessorOption that allows overriding of the definition parser.