Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EmptyConfigErr = &emptyCfgErr{}
Functions ¶
func ParserSupportsTerraform ¶
Types ¶
type Attribute ¶
type Attribute struct {
// contains filtered or unexported fields
}
func (*Attribute) IsComputedOnly ¶
func (*Attribute) IsDeclared ¶
func (*Attribute) Schema ¶
func (a *Attribute) Schema() *tfjson.SchemaAttribute
type Block ¶
type Block interface {
BlockAtPos(pos hcl.Pos) (Block, bool)
Range() hcl.Range
PosInBody(pos hcl.Pos) bool
PosInAttribute(pos hcl.Pos) bool
Attributes() map[string]*Attribute
BlockTypes() map[string]*BlockType
}
Block implements an abstraction above HCL block and both tfjson's SchemaBlock & SchemaBlockType
func ParseBlock ¶
func ParseBlock(block *hclsyntax.Block, schema *tfjson.SchemaBlock) Block
ParseBlock parses HCL configuration based on tfjson's SchemaBlock and keeps hold of all tfjson schema details on block or attribute level
type BlockType ¶
type BlockType struct {
BlockList []Block
// contains filtered or unexported fields
}
func (*BlockType) ReachedMaxItems ¶
func (*BlockType) Schema ¶
func (b *BlockType) Schema() *tfjson.SchemaBlockType
type BlockTypes ¶
func (BlockTypes) AddBlock ¶
func (bt BlockTypes) AddBlock(name string, block *hclsyntax.Block, typeSchema *tfjson.SchemaBlockType)
type ConfigBlock ¶
type Parser ¶
type Parser interface {
SetLogger(*log.Logger)
SetCapabilities(lsp.TextDocumentClientCapabilities)
SetSchemaReader(schema.Reader)
ParseBlockFromHCL(*hcl.Block) (ConfigBlock, error)
}
func FindCompatibleParser ¶
FindCompatibleParser finds a parser that is compatible with given Terraform version, so that it parses config accuretly
Click to show internal directories.
Click to hide internal directories.