Documentation
¶
Index ¶
Constants ¶
View Source
const ( ListMergeAppend = "APPEND" ListMergeOverwrite = "OVERWRITE" )
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
func Apply(template *PrTemplate) error
Types ¶
type AutomationContract ¶
type CreateSpec ¶
type CreateSpec struct {
ExternalDir string
Templates []*CreateTemplate `json:"templates"`
}
type CreateTemplate ¶
type DeleteSpec ¶
type PrContracts ¶
type PrContracts struct {
ApiVersion string `json:"apiVersion"`
Kind string `json:"kind"`
Metadata map[string]interface{} `json:"metadata"`
Context map[string]interface{} `json:"context"`
Spec PrContractsSpec `json:"spec"`
}
func BuildContracts ¶
func BuildContracts(path string) (*PrContracts, error)
type PrContractsSpec ¶
type PrContractsSpec struct {
Templates *TemplateCopy `json:"templates"`
Workdir string `json:"workdir,omitempty"`
Automations []AutomationContract `json:"automations"`
}
type PrTemplate ¶
type PrTemplate struct {
ApiVersion string `json:"apiVersion"`
Kind string `json:"kind"`
Metadata map[string]interface{} `json:"metadata"`
Context map[string]interface{} `json:"context"`
Spec PrTemplateSpec `json:"spec"`
}
func Build ¶
func Build(path string) (*PrTemplate, error)
func BuildCRD ¶
func BuildCRD(path, contextFile string) (*PrTemplate, error)
type PrTemplateSpec ¶
type PrTemplateSpec struct {
Updates *UpdateSpec `json:"updates"`
Creates *CreateSpec `json:"creates"`
Deletes *DeleteSpec `json:"deletes"`
}
type RegexReplacement ¶
type TemplateCopy ¶
type UpdateSpec ¶
type UpdateSpec struct {
Regexes []string `json:"regexes"`
Files []string `json:"files"`
ReplaceTemplate string `json:"replace_template"`
Yq string `json:"yq"`
MatchStrategy string `json:"match_strategy"`
RegexReplacements []RegexReplacement `json:"regex_replacements"`
YamlOverlays []YamlOverlay `json:"yaml_overlays"`
}
Click to show internal directories.
Click to hide internal directories.