config

package
v0.0.0-...-4add889 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Constant

type Constant struct {
	Name        string
	DeclRange   hcl.Range
	Description hcl.Expression
	Default     hcl.Expression
}

type File

type File struct {
	SourcePath string
	SourceAST  *hcl.File
	Source     []byte

	Description   *hcl.Attribute
	Conditions    []*hcl.Attribute
	Constants     []*Constant
	Locals        []*hcl.Attribute
	Mappings      []*hcl.Attribute
	Metadata      []*hcl.Attribute
	Modules       []*ModuleCall
	Outputs       []*Output
	Parameters    []*Parameter
	Resources     []*Resource
	UIParamGroups []*UIParamGroup
	UIParamLabels []*hcl.Attribute
}

type Module

type Module struct {
	// SourcePath is the path to the directory or file from which this module
	// was loaded.
	SourcePath string

	// If this module was loaded from a file, SourceDir gives the path to
	// the directory containing that file. Otherwise it matches SourcePath.
	SourceDir string

	Files    map[string]*File
	FileASTs map[string]*hcl.File

	Description   hcl.Expression
	Conditions    map[string]*hcl.Attribute
	Constants     map[string]*Constant
	Locals        map[string]*hcl.Attribute
	Mappings      map[string]*hcl.Attribute
	Metadata      map[string]*hcl.Attribute
	Modules       map[string]*ModuleCall
	Outputs       map[string]*Output
	Parameters    map[string]*Parameter
	Resources     map[string]*Resource
	UIParamGroups []*UIParamGroup
	UIParamLabels map[string]*hcl.Attribute
}

func NewModule

func NewModule(sourcePath, sourceDir string, files ...*File) (*Module, hcl.Diagnostics)

type ModuleCall

type ModuleCall struct {
	Name       string
	DeclRange  hcl.Range
	Source     hcl.Expression
	Parameters hcl.Attributes
	Constants  hcl.Attributes
	ForEach    hcl.Expression
}

type Output

type Output struct {
	Name        string
	DeclRange   hcl.Range
	Description hcl.Expression
	Value       hcl.Expression
	Export      *OutputExport
}

type OutputExport

type OutputExport struct {
	Name hcl.Expression
}

type Parameter

type Parameter struct {
	Name                  string
	Type                  string
	DeclRange             hcl.Range
	Description           hcl.Expression
	Default               hcl.Expression
	AllowedPattern        hcl.Expression
	AllowedValues         hcl.Expression
	ConstraintDescription hcl.Expression
	MinLength             hcl.Expression
	MaxLength             hcl.Expression
	MinValue              hcl.Expression
	MaxValue              hcl.Expression
	Obscure               hcl.Expression
}

type Parser

type Parser struct {
	HCLParser *hclparse.Parser
}

func NewParser

func NewParser() *Parser

func (*Parser) Files

func (p *Parser) Files() map[string]*hcl.File

func (*Parser) ParseDir

func (p *Parser) ParseDir(path string) (*Module, hcl.Diagnostics)

func (*Parser) ParseDirOrFile

func (p *Parser) ParseDirOrFile(path string) (*Module, hcl.Diagnostics)

func (*Parser) ParseFile

func (p *Parser) ParseFile(filename string) (*File, hcl.Diagnostics)

func (*Parser) ParseFileSource

func (p *Parser) ParseFileSource(src []byte, filename string) (*File, hcl.Diagnostics)

func (*Parser) ParseValuesFiles

func (p *Parser) ParseValuesFiles(filenames ...string) (hcl.Attributes, hcl.Diagnostics)

func (*Parser) ParseValuesSource

func (p *Parser) ParseValuesSource(src []byte, filename string) (hcl.Attributes, hcl.Diagnostics)

type Resource

type Resource struct {
	LogicalID      string
	Type           string
	DeclRange      hcl.Range
	Properties     hcl.Attributes
	Metadata       hcl.Attributes
	DependsOn      []hcl.Traversal
	CreationPolicy *ResourceCreationPolicy
	DeletionPolicy hcl.Expression
	UpdatePolicy   *ResourceUpdatePolicy
	ForEach        hcl.Expression
}

type ResourceCreationPolicy

type ResourceCreationPolicy struct {
	AutoScaling *ResourceCreationPolicyAutoScaling
	Signal      *ResourceCreationPolicySignal
}

type ResourceCreationPolicyAutoScaling

type ResourceCreationPolicyAutoScaling struct {
	MinSuccessfulInstancesPercent hcl.Expression
}

type ResourceCreationPolicySignal

type ResourceCreationPolicySignal struct {
	Count   hcl.Expression
	Timeout hcl.Expression
}

type ResourceUpdatePolicy

type ResourceUpdatePolicy struct {
	DeclRange   hcl.Range
	AutoScaling *ResourceUpdatePolicyAutoScaling
}

type ResourceUpdatePolicyAutoScaling

type ResourceUpdatePolicyAutoScaling struct {
	Replace hcl.Expression
}

type UIParamGroup

type UIParamGroup struct {
	Parameters []hcl.Traversal
}

Jump to

Keyboard shortcuts

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