templates

package
v0.0.0-...-aca1e04 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TemplateFileNotFoundError              = cterror.Error("template file not found")
	CouldNotReadTemplateVariablesFileError = cterror.Error("could not read template variables file")
)
View Source
const (
	UnsupportedTemplateType = cterror.Error("unsupported template type")

	BoshTemplateType TemplateType = "bosh"
	RubyTemplateType              = "ruby"
)
View Source
const (
	ArtifactsOutputVolume = "artifacts"
	ArtifactsJobName      = "outputs"

	JobStatusArgKey = "status"
)
View Source
const (
	TemplateNotSupportedError = cterror.Error("template type not supported")
)

Variables

View Source
var BuildPksNSXTReleaseTemplate = `` /* 3964-byte string literal not displayed */
View Source
var BuildTileTemplate = `` /* 3236-byte string literal not displayed */
View Source
var DeployKuboPipelineFetchOutputFunc = PipelineFetchOutputFunc(deployKuboPipelineOutput)
View Source
var DeployKuboPipelineGetArtifactsFunc = PipelineGetArtifactsFunc(deployKuboPipelineGetArtifacts)
View Source
var DeployKuboPipelineTemplate = `` /* 9764-byte string literal not displayed */
View Source
var InstallTileTemplate = `` /* 8179-byte string literal not displayed */
View Source
var NsxAcceptanceTestsPipelineFetchOutputFunc = PipelineFetchOutputFunc(nsxAcceptanceTestsPipelineOutput)
View Source
var NsxAcceptanceTestsTemplate = `` /* 7171-byte string literal not displayed */
View Source
var RelengAcceptanceTestsPipelineTemplate = `` /* 7285-byte string literal not displayed */
View Source
var (
	SupportedTemplateType = map[string]string{
		"build-tile":              BuildTileTemplate,
		"install-tile":            InstallTileTemplate,
		"nsx-acceptance-tests":    NsxAcceptanceTestsTemplate,
		"kubo":                    DeployKuboPipelineTemplate,
		"releng-acceptance-tests": RelengAcceptanceTestsPipelineTemplate,
		"build-pks-nsx-t-release": BuildPksNSXTReleaseTemplate,
	}
)

Functions

func AllUniqueKeys

func AllUniqueKeys(data string, templateType TemplateType) ([]string, error)

func AllUniqueKeysInBoshTemplate

func AllUniqueKeysInBoshTemplate(data string) []string

func AllUniqueKeysInRubyTemplate

func AllUniqueKeysInRubyTemplate(data string) []string

func ConvertTemplate

func ConvertTemplate(data string, from TemplateType, to TemplateType) (string, error)

func Interpolate

func Interpolate(configFile string, varFiles []string) (string, error)

func InterpolateContent

func InterpolateContent(config string, vars []string) (string, error)

Types

type Args

type Args map[string]interface{}

func (Args) Add

func (a Args) Add(key string, value interface{})

type PipelineFetchOutputFunc

type PipelineFetchOutputFunc func(team, pipeline string, cli concourseclient.ConcourseClient, args Args) (PipelineOutput, error)

type PipelineGetArtifactsFunc

type PipelineGetArtifactsFunc func(target, pipeline string) (string, error)

type PipelineOutput

type PipelineOutput map[string]string

type TemplateResolver

type TemplateResolver struct {
	// contains filtered or unexported fields
}

func NewTemplateResolver

func NewTemplateResolver(configPayload []byte, params []boshtemplate.Variables) TemplateResolver

func (TemplateResolver) Resolve

func (resolver TemplateResolver) Resolve(expectAllKeys bool) ([]byte, error)

type TemplateType

type TemplateType string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL