Documentation
¶
Index ¶
- type BuilderVar
- type BuilderVarDefault
- type DraftConfig
- func (d *DraftConfig) ApplyDefaultVariables() error
- func (d *DraftConfig) ApplyDefaultVariablesForVersion(version string) error
- func (d *DraftConfig) DeepCopy() *DraftConfig
- func (d *DraftConfig) GetVariable(name string) (*BuilderVar, error)
- func (d *DraftConfig) GetVariableExampleValues() map[string][]string
- func (d *DraftConfig) GetVariableMap() map[string]string
- func (d *DraftConfig) GetVariableValue(name string) (string, error)
- func (d *DraftConfig) SetFileNameOverride(input, override string)
- func (d *DraftConfig) SetVariable(name, value string)
- func (d *DraftConfig) VariableMapToDraftConfig(flagVariablesMap map[string]string)
- type TemplateVariableRecorder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuilderVar ¶
type BuilderVar struct { Name string `yaml:"name"` Default BuilderVarDefault `yaml:"default"` Description string `yaml:"description"` ExampleValues []string `yaml:"exampleValues"` Type string `yaml:"type"` Kind string `yaml:"kind"` Value string `yaml:"value"` Versions string `yaml:"versions"` }
func (*BuilderVar) DeepCopy ¶ added in v0.0.39
func (bv *BuilderVar) DeepCopy() *BuilderVar
type BuilderVarDefault ¶ added in v0.0.23
type DraftConfig ¶
type DraftConfig struct { TemplateName string `yaml:"templateName"` DisplayName string `yaml:"displayName"` Description string `yaml:"description"` Type string `yaml:"type"` Versions string `yaml:"versions"` DefaultVersion string `yaml:"defaultVersion"` Variables []*BuilderVar `yaml:"variables"` FileNameOverrideMap map[string]string `yaml:"filenameOverrideMap"` }
func NewConfigFromFS ¶ added in v0.0.39
func NewConfigFromFS(fileSys fs.FS, path string) (*DraftConfig, error)
func (*DraftConfig) ApplyDefaultVariables ¶ added in v0.0.34
func (d *DraftConfig) ApplyDefaultVariables() error
ApplyDefaultVariables will apply the defaults to variables that are not already set
func (*DraftConfig) ApplyDefaultVariablesForVersion ¶ added in v0.0.39
func (d *DraftConfig) ApplyDefaultVariablesForVersion(version string) error
ApplyDefaultVariablesForVersion will apply the defaults to variables that are not already set for a specific template version
func (*DraftConfig) DeepCopy ¶ added in v0.0.39
func (d *DraftConfig) DeepCopy() *DraftConfig
func (*DraftConfig) GetVariable ¶ added in v0.0.36
func (d *DraftConfig) GetVariable(name string) (*BuilderVar, error)
func (*DraftConfig) GetVariableExampleValues ¶ added in v0.0.27
func (d *DraftConfig) GetVariableExampleValues() map[string][]string
func (*DraftConfig) GetVariableMap ¶ added in v0.0.37
func (d *DraftConfig) GetVariableMap() map[string]string
Returns a map of variable names to values used in Gotemplate
func (*DraftConfig) GetVariableValue ¶ added in v0.0.39
func (d *DraftConfig) GetVariableValue(name string) (string, error)
func (*DraftConfig) SetFileNameOverride ¶ added in v0.0.39
func (d *DraftConfig) SetFileNameOverride(input, override string)
SetFileNameOverride sets the filename override for a specific file
func (*DraftConfig) SetVariable ¶ added in v0.0.36
func (d *DraftConfig) SetVariable(name, value string)
func (*DraftConfig) VariableMapToDraftConfig ¶ added in v0.0.36
func (d *DraftConfig) VariableMapToDraftConfig(flagVariablesMap map[string]string)
handles flags that are meant to represent template variables
type TemplateVariableRecorder ¶ added in v0.0.27
type TemplateVariableRecorder interface {
Record(key, value string)
}
TemplateVariableRecorder is an interface for recording variables that are read using draft configs
Click to show internal directories.
Click to hide internal directories.