-
Notifications
You must be signed in to change notification settings - Fork 530
/
block.go
44 lines (42 loc) · 1.07 KB
/
block.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package block
import (
"github.com/hashicorp/hcl/v2"
"github.com/zclconf/go-cty/cty"
)
type Block interface {
Attributes() map[string]Attribute
AttachEvalContext(ctx *hcl.EvalContext)
HasModuleBlock() bool
GetModuleBlock() (Block, error)
Type() string
Labels() []string
Range() Range
GetFirstMatchingBlock(names ...string) Block
GetBlock(name string) Block
AllBlocks() Blocks
GetBlocks(name string) Blocks
GetAttributes() []Attribute
GetAttribute(name string) Attribute
GetNestedAttribute(name string) Attribute
Reference() *Reference
LocalName() string
FullName() string
UniqueName() string
TypeLabel() string
NameLabel() string
Clone(index cty.Value) Block
IsCountExpanded() bool
HasChild(childElement string) bool
MissingChild(childElement string) bool
MissingNestedChild(childElement string) bool
InModule() bool
Label() string
HasBlock(childElement string) bool
IsResourceType(resourceType string) bool
IsEmpty() bool
Values() cty.Value
Context() *hcl.EvalContext
ReadLines() (lines []string, comments []string, err error)
IsNil() bool
IsNotNil() bool
}