Documentation
¶
Index ¶
- func DirectoryAutoFix(dirPath string) error
- type Arg
- type Args
- type AutoFixBlock
- type HclAttribute
- type HclBlock
- type HclFile
- type LocalsBlock
- type MovedBlock
- type NestedBlock
- type NestedBlocks
- type OutputBlock
- type OutputsFile
- type RemovedBlock
- type ResourceBlock
- type TerraformBlock
- type VariableBlock
- type VariablesFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DirectoryAutoFix ¶
Types ¶
type Arg ¶
type Arg struct { Name string File *hcl.File *HclAttribute }
Arg is a wrapper of the attribute
type Args ¶
type Args []*Arg
Args is the collection of args with the same type
func (Args) SortByName ¶
func (Args) SortHeadMetaArgs ¶
type AutoFixBlock ¶
type AutoFixBlock interface {
AutoFix()
}
func BuildRemovedBlock ¶
func BuildRemovedBlock(b *HclBlock, f *hcl.File) AutoFixBlock
type HclAttribute ¶
func NewHclAttribute ¶
func NewHclAttribute(attribute *hclsyntax.Attribute, writeAttribute *hclwrite.Attribute) *HclAttribute
type HclBlock ¶
func (*HclBlock) Attributes ¶
func (b *HclBlock) Attributes() map[string]*HclAttribute
func (*HclBlock) NestedBlocks ¶
type HclFile ¶
type HclFile struct { *hcl.File WriteFile *hclwrite.File FileName string // contains filtered or unexported fields }
func ParseConfig ¶
func (*HclFile) ClearWriteFile ¶
func (f *HclFile) ClearWriteFile()
type LocalsBlock ¶
func BuildLocalsBlock ¶
func BuildLocalsBlock(block *HclBlock, file *hcl.File) *LocalsBlock
func (*LocalsBlock) AutoFix ¶
func (b *LocalsBlock) AutoFix()
type MovedBlock ¶
type MovedBlock struct { HclBlock *HclBlock File *hcl.File }
func BuildMovedBlock ¶
func BuildMovedBlock(block *HclBlock, file *hcl.File) *MovedBlock
func (*MovedBlock) AutoFix ¶
func (b *MovedBlock) AutoFix()
type NestedBlock ¶
NestedBlock is a wrapper of the nested Block
func (*NestedBlock) AutoFix ¶
func (b *NestedBlock) AutoFix()
func (*NestedBlock) BlockType ¶
func (b *NestedBlock) BlockType() string
func (*NestedBlock) DefRange ¶
func (b *NestedBlock) DefRange() hcl.Range
DefRange gets the definition range of the nested Block
type NestedBlocks ¶
type NestedBlocks struct { Blocks []*NestedBlock Range *hcl.Range }
NestedBlocks is the collection of nestedBlocks with the same type
func (*NestedBlocks) GetRange ¶
func (b *NestedBlocks) GetRange() *hcl.Range
GetRange returns the entire range of this type of nestedBlocks
type OutputBlock ¶
func BuildOutputBlock ¶
func BuildOutputBlock(f *hcl.File, b *HclBlock) *OutputBlock
func (*OutputBlock) AutoFix ¶
func (b *OutputBlock) AutoFix()
type OutputsFile ¶
type OutputsFile struct { File *HclFile // contains filtered or unexported fields }
func BuildOutputsFile ¶
func BuildOutputsFile(f *HclFile) *OutputsFile
func (*OutputsFile) AutoFix ¶
func (f *OutputsFile) AutoFix()
type RemovedBlock ¶
type RemovedBlock struct { HclBlock *HclBlock File *hcl.File }
func (*RemovedBlock) AutoFix ¶
func (r *RemovedBlock) AutoFix()
type ResourceBlock ¶
type ResourceBlock struct { Type string TailMetaArgs Args TailMetaNestedBlocks *NestedBlocks // contains filtered or unexported fields }
ResourceBlock is the wrapper of a resource Block
func BuildBlockWithSchema ¶
func BuildBlockWithSchema(block *HclBlock, file *hcl.File) *ResourceBlock
BuildBlockWithSchema Build the root Block wrapper using hclsyntax.Block
func (*ResourceBlock) AutoFix ¶
func (b *ResourceBlock) AutoFix()
type TerraformBlock ¶
type TerraformBlock struct { HclBlock *HclBlock RequiredProvidersBlock *HclBlock File *hcl.File // contains filtered or unexported fields }
func BuildTerraformBlock ¶
func BuildTerraformBlock(block *HclBlock, file *hcl.File) *TerraformBlock
func (*TerraformBlock) AutoFix ¶
func (b *TerraformBlock) AutoFix()
type VariableBlock ¶
func BuildVariableBlock ¶
func BuildVariableBlock(f *hcl.File, b *HclBlock) *VariableBlock
func (*VariableBlock) AutoFix ¶
func (b *VariableBlock) AutoFix()
type VariablesFile ¶
type VariablesFile struct { File *HclFile // contains filtered or unexported fields }
func BuildVariablesFile ¶
func BuildVariablesFile(f *HclFile) *VariablesFile
func (*VariablesFile) AutoFix ¶
func (f *VariablesFile) AutoFix()
Click to show internal directories.
Click to hide internal directories.