templatescompiler

package
v2.0.40+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2017 License: Apache-2.0 Imports: 13 Imported by: 156

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJobEvaluationContext

func NewJobEvaluationContext(
	releaseJob bireljob.Job,
	releaseJobProperties *biproperty.Map,
	jobProperties biproperty.Map,
	globalProperties biproperty.Map,
	deploymentName string,
	address string,
	uuidGen boshuuid.Generator,
	logger boshlog.Logger,
) bierbrenderer.TemplateEvaluationContext

Types

type JobListRenderer

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

func NewJobListRenderer

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

type JobRenderer

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

func NewJobRenderer

func NewJobRenderer(
	erbRenderer bierbrenderer.ERBRenderer,
	fs boshsys.FileSystem,
	uuidGen boshuuid.Generator,
	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
	SHA1() string
	Delete() error
	DeleteSilently()
}

func NewRenderedJobListArchive

func NewRenderedJobListArchive(
	list RenderedJobList,
	path 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,
	digestCalculator bicrypto.DigestCalculator,
	logger boshlog.Logger,
) RenderedJobListCompressor

type RootContext

type RootContext struct {
	Index      int        `json:"index"`
	ID         string     `json:"id"`
	AZ         string     `json:"az"`
	Bootstrap  bool       `json:"bootstrap"`
	JobContext jobContext `json:"job"`
	Deployment string     `json:"deployment"`
	Address    string     `json:"address,omitempty"`

	// 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 instance group (deployment job) properties
	JobProperties     *biproperty.Map `json:"job_properties"`     // values from release job (aka template) 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