templatescompiler

package
v0.0.56 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2015 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJobEvaluationContext

func NewJobEvaluationContext(
	releaseJob bireljob.Job,
	jobProperties biproperty.Map,
	globalProperties biproperty.Map,
	deploymentName string,
	logger boshlog.Logger,
) bierbrenderer.TemplateEvaluationContext

Types

type JobListRenderer

type JobListRenderer interface {
	Render(
		releaseJobs []bireljob.Job,
		jobProperties biproperty.Map,
		globalProperties biproperty.Map,
		deploymentName string,
	) (RenderedJobList, error)
}

func NewJobListRenderer

func NewJobListRenderer(
	jobRenderer JobRenderer,
	logger boshlog.Logger,
) JobListRenderer

type JobRenderer

type JobRenderer interface {
	Render(releaseJob bireljob.Job, jobProperties, globalProperties biproperty.Map, deploymentName string) (RenderedJob, error)
}

func NewJobRenderer

func NewJobRenderer(
	erbRenderer bierbrenderer.ERBRenderer,
	fs boshsys.FileSystem,
	logger boshlog.Logger,
) JobRenderer

type RenderedJob

type RenderedJob interface {
	Job() bireljob.Job
	Path() string // dir of multiple rendered files
	Delete() error
	DeleteSilently()
}

func NewRenderedJob

func NewRenderedJob(
	job bireljob.Job,
	path string,
	fs boshsys.FileSystem,
	logger boshlog.Logger,
) RenderedJob

type RenderedJobList

type RenderedJobList interface {
	Add(RenderedJob)
	All() []RenderedJob
	Delete() error
	DeleteSilently()
}

func NewRenderedJobList

func NewRenderedJobList() RenderedJobList

type RenderedJobListArchive

type RenderedJobListArchive interface {
	List() RenderedJobList
	Path() string
	Fingerprint() string
	SHA1() string
	Delete() error
	DeleteSilently()
}

func NewRenderedJobListArchive

func NewRenderedJobListArchive(
	list RenderedJobList,
	path string,
	fingerprint string,
	sha1 string,
	fs boshsys.FileSystem,
	logger boshlog.Logger,
) RenderedJobListArchive

type RenderedJobListCompressor

type RenderedJobListCompressor interface {
	Compress(RenderedJobList) (RenderedJobListArchive, error)
}

func NewRenderedJobListCompressor

func NewRenderedJobListCompressor(
	fs boshsys.FileSystem,
	compressor boshcmd.Compressor,
	sha1Calculator bicrypto.SHA1Calculator,
	logger boshlog.Logger,
) RenderedJobListCompressor

type RootContext

type RootContext struct {
	Index      int        `json:"index"`
	JobContext jobContext `json:"job"`
	Deployment string     `json:"deployment"`

	// Usually is accessed with <%= spec.networks.default.ip %>
	NetworkContexts map[string]networkContext `json:"networks"`

	//TODO: this should be a map[string]interface{}
	GlobalProperties  biproperty.Map `json:"global_properties"`  // values from manifest's top-level properties
	ClusterProperties biproperty.Map `json:"cluster_properties"` // values from manifest's jobs[].properties
	DefaultProperties biproperty.Map `json:"default_properties"` // values from release's job's spec
}

RootContext is exposed as an open struct in ERB templates. It must stay same to provide backwards compatible API.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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