manifest

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Version1_0 = "1.0"

Variables

This section is empty.

Functions

func ParseParameterFile

func ParseParameterFile(path string) (map[string]string, error)

Types

type Decision

type Decision struct {
	AccountId    string
	Region       string
	TemplateBody string
	Parameters   map[string]string
	StackName    string
	Protected    bool
	Tenant       NameLabel
	Stack        NameLabel
}

type Deployment

type Deployment struct {
	// AccountId is an AWS account ID to check the profile against.
	AccountId string

	// Region is an AWS region, if different from the profile's default.
	Region string

	// Template is the path of a template file relative to Config.
	Template string

	// Parameter contains paths to parameter files and direct overrides.
	Parameters []*Parameter

	// StackName can include substitutions (as Go templates).
	StackName string

	// Protected deployments ignore the --yes flag.
	Protected *bool
}

func (*Deployment) ApplyTemplate

func (d *Deployment) ApplyTemplate(tpl *Template) (err error)

func (*Deployment) MergeFrom

func (d *Deployment) MergeFrom(other *Deployment)

type Global

type Global struct {
	Constants map[string]string
	Tags      map[string]string
	Default   *Deployment
}

type Manifest

type Manifest struct {
	Version string `json:"Version"`
	Global  Global
	Tenants []*Tenant
	Stacks  []*Stack
}

func Parse

func Parse(reader io.Reader) (*Manifest, error)

func (*Manifest) AllDeployments

func (m *Manifest) AllDeployments() ([]*Decision, error)

func (*Manifest) Process

func (m *Manifest) Process(input ProcessInput) ([]*Decision, error)

type NameLabel

type NameLabel struct {
	Name  string
	Label string
}

type Parameter

type Parameter struct {
	// File is the path of a parameter file relative to Config.
	File  string
	Key   string
	Value string
}

func (*Parameter) ApplyTemplate

func (p *Parameter) ApplyTemplate(tpl *Template) (err error)

type ProcessInput

type ProcessInput struct {
	Stack  string
	Tenant string
}

type Stack

type Stack struct {
	// Label is the longer, human-readable summary of a stack.
	Name    string
	Label   string
	Default *Deployment
	Targets []*Target
	Tags    map[string]string
}

type Target

type Target struct {
	Tenant   string
	Override *Deployment
}

type Template

type Template struct {
	Constants map[string]string
	Tags      map[string]string
	Tenant    *Tenant
	Stack     *Deployment
}

func NewTemplate

func NewTemplate() *Template

func (*Template) ApplyTo

func (tpl *Template) ApplyTo(text *string) error

type Tenant

type Tenant struct {
	Name      string
	Constants map[string]string
	Label     string
	Default   *Deployment
	Tags      map[string]string
}

func (*Tenant) ApplyTemplate

func (t *Tenant) ApplyTemplate(tpl *Template) (err error)

Jump to

Keyboard shortcuts

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