pattern

package
v0.0.0-...-86c0a12 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Director

type Director Template

Director describes how to configure the OpsManager director

func (*Director) ToTemplate

func (d *Director) ToTemplate() *Template

ToTemplate converts a Director to a Template

type Fixtures

type Fixtures struct {
	Dir            string
	DirectorSuffix string
	TilesSuffix    string
}

type Pattern

type Pattern struct {
	Director  Director      `yaml:"director" validate:"required,dive"`
	Tiles     []Tile        `yaml:"tiles" validate:"required,dive"`
	Variables []interface{} `yaml:"variables"`
}

Pattern can be given to tiler to lay tiles

func NewPattern

func NewPattern(t Template, varsStore string, expectAllKeys bool) (p Pattern, err error)

NewPattern will render a Template using optionally a given varsStore

func (*Pattern) MatchesFixtures

func (p *Pattern) MatchesFixtures(f Fixtures)

func (*Pattern) Validate

func (p *Pattern) Validate(expectAllKeys bool) error

Validate check if all required fields are provided

type PivnetFile

type PivnetFile struct {
	Slug    string `yaml:"product_slug" validate:"required"`
	Version string `yaml:"release_version" validate:"required"`
	Glob    string `yaml:"file_glob" validate:"required"`
	URL     string `yaml:"download_url"`
}

PivnetFile references a file on the pivotal network or optionally via an URL (when using a caching proxy)

type Template

type Template struct {
	Manifest  string                 `yaml:"manifest"`
	OpsFiles  []string               `yaml:"ops_files"`
	VarsFiles []string               `yaml:"vars_files"`
	Vars      map[string]interface{} `yaml:"vars"`
	VarsStore string
	Store     http.FileSystem
}

Template can be rendered using the bosh interpolate library

func (*Template) Evaluate

func (t *Template) Evaluate(expectAllKeys bool) ([]byte, error)

Evaluate renders a Template using the bosh interpolate library

type Tile

type Tile struct {
	Name     string     `yaml:"name" validate:"required"`
	Version  string     `yaml:"version" validate:"required"`
	Product  PivnetFile `yaml:"product" validate:"required,dive"`
	Stemcell PivnetFile `yaml:"stemcell" validate:"required,dive"`
	Template `yaml:",inline"`
}

Tile describes how to configure a tile, as well as where to download it from

func (*Tile) ToTemplate

func (t *Tile) ToTemplate() *Template

ToTemplate converts a Tile to a Template

Jump to

Keyboard shortcuts

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