Documentation
¶
Overview ¶
Copyright © 2019 Thought Machine
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ErrNonYAMLFileEncountered = errors.New("non-yaml file found in directory")
)
Errors returned from this package
var TemplateVars = newTemplateVars()
TemplateVars represents the vars that are available in all templates
Functions ¶
func PrepareVars ¶
func PrepareVars(files PipelineYAMLDocs) error
PrepareVars adds contextual vars to the templater
Types ¶
type PatchKindYAMLDocs ¶
PatchKindYAMLDocs stores all of the jsonpatch yaml docs found by type
func LoadPatchYAMLFiles ¶
func LoadPatchYAMLFiles(sourcePath string) (PatchKindYAMLDocs, error)
LoadPatchYAMLFiles returns the yaml docs by kind from a given directory
type PipelineParam ¶
PipelineParam represents a Parameter in a Pipeline
type PipelineTask ¶
PipelineTask represents a Task in a Pipeline
type PipelineYAMLDocs ¶
type PipelineYAMLDocs map[string]ResourceDocs
PipelineYAMLDocs stores all of the yaml docs found in a file in the format map[path][]doc
func ExecuteFiles ¶
func ExecuteFiles(files PipelineYAMLDocs) (PipelineYAMLDocs, error)
ExecuteFiles executes the templates
func LoadPipelineYAMLFiles ¶
func LoadPipelineYAMLFiles(sourcePath string) (PipelineYAMLDocs, error)
LoadPipelineYAMLFiles returns all of the PipelineYAMLDocs in a directory
type ResourceDocs ¶
type ResourceDocs []ResourceDoc
ResourceDocs represents a set of K8s resource documents
func GeneratePipelineResourceDocs ¶
func GeneratePipelineResourceDocs() (ResourceDocs, error)
GeneratePipelineResourceDocs returns the set of unique resource docs for a pipeline
type TypeYAMLDocs ¶
TypeYAMLDocs represents a list of resource docs per type in yaml format
func PatchFileYAMLs ¶
func PatchFileYAMLs( files PipelineYAMLDocs, patches PatchKindYAMLDocs, ) (TypeYAMLDocs, error)
PatchFileYAMLs applies the given patches to files