Documentation
¶
Index ¶
- Variables
- func IsValidBlockReference(name string) bool
- func IsValidType(name string) bool
- type Attribute
- type Block
- type Blocks
- type EqualityOption
- type HCLAttribute
- func (attr *HCLAttribute) Contains(checkValue interface{}, equalityOptions ...EqualityOption) bool
- func (attr *HCLAttribute) EndsWith(suffix interface{}) bool
- func (attr *HCLAttribute) Equals(checkValue interface{}, equalityOptions ...EqualityOption) bool
- func (attr *HCLAttribute) GreaterThan(checkValue interface{}) bool
- func (attr *HCLAttribute) GreaterThanOrEqualTo(checkValue interface{}) bool
- func (attr *HCLAttribute) IsAny(options ...interface{}) bool
- func (attr *HCLAttribute) IsBool() bool
- func (attr *HCLAttribute) IsDataBlockReference() bool
- func (attr *HCLAttribute) IsEmpty() bool
- func (attr *HCLAttribute) IsFalse() bool
- func (attr *HCLAttribute) IsLiteral() bool
- func (attr *HCLAttribute) IsNone(options ...interface{}) bool
- func (attr *HCLAttribute) IsNumber() bool
- func (attr *HCLAttribute) IsResolvable() bool
- func (attr *HCLAttribute) IsResourceBlockReference(resourceType string) bool
- func (attr *HCLAttribute) IsString() bool
- func (attr *HCLAttribute) IsTrue() bool
- func (attr *HCLAttribute) LessThan(checkValue interface{}) bool
- func (attr *HCLAttribute) LessThanOrEqualTo(checkValue interface{}) bool
- func (attr *HCLAttribute) MapValue(mapKey string) cty.Value
- func (attr *HCLAttribute) Name() string
- func (attr *HCLAttribute) Range() Range
- func (attr *HCLAttribute) Reference() (*Reference, error)
- func (attr *HCLAttribute) ReferencesBlock(b Block) bool
- func (attr *HCLAttribute) RegexMatches(pattern interface{}) bool
- func (attr *HCLAttribute) StartsWith(prefix interface{}) bool
- func (attr *HCLAttribute) Type() cty.Type
- func (attr *HCLAttribute) Value() (ctyVal cty.Value)
- func (attr *HCLAttribute) ValueAsStrings() []string
- type HCLBlock
- func (block *HCLBlock) AllBlocks() Blocks
- func (block *HCLBlock) AttachEvalContext(ctx *hcl.EvalContext)
- func (block *HCLBlock) Attributes() map[string]Attribute
- func (block *HCLBlock) FullName() string
- func (block *HCLBlock) GetAttribute(name string) Attribute
- func (block *HCLBlock) GetAttributes() []Attribute
- func (block *HCLBlock) GetBlock(name string) Block
- func (block *HCLBlock) GetBlocks(name string) Blocks
- func (block *HCLBlock) GetFirstMatchingBlock(names ...string) Block
- func (block *HCLBlock) GetModuleBlock() (Block, error)
- func (block *HCLBlock) GetNestedAttribute(name string) Attribute
- func (block *HCLBlock) HasBlock(childElement string) bool
- func (block *HCLBlock) HasChild(childElement string) bool
- func (block *HCLBlock) HasModuleBlock() bool
- func (block *HCLBlock) InModule() bool
- func (block *HCLBlock) IsEmpty() bool
- func (block *HCLBlock) IsResourceType(resourceType string) bool
- func (block *HCLBlock) Label() string
- func (block *HCLBlock) Labels() []string
- func (block *HCLBlock) LocalName() string
- func (block *HCLBlock) MissingChild(childElement string) bool
- func (block *HCLBlock) NameLabel() string
- func (block *HCLBlock) Range() Range
- func (block *HCLBlock) Reference() *Reference
- func (block *HCLBlock) Type() string
- func (block *HCLBlock) TypeLabel() string
- func (block *HCLBlock) Values() cty.Value
- type Range
- type Reference
- type Type
Constants ¶
This section is empty.
Variables ¶
View Source
var TypeData = Type{ // contains filtered or unexported fields }
View Source
var TypeLocal = Type{ // contains filtered or unexported fields }
View Source
var TypeModule = Type{ // contains filtered or unexported fields }
View Source
var TypeOutput = Type{ // contains filtered or unexported fields }
View Source
var TypeProvider = Type{ // contains filtered or unexported fields }
View Source
var TypeResource = Type{ // contains filtered or unexported fields }
View Source
var TypeTerraform = Type{ // contains filtered or unexported fields }
View Source
var TypeVariable = Type{ // contains filtered or unexported fields }
View Source
var ValidTypes = []Type{ TypeData, TypeLocal, TypeModule, TypeOutput, TypeProvider, TypeResource, TypeTerraform, TypeVariable, }
Functions ¶
func IsValidBlockReference ¶
func IsValidType ¶
Types ¶
type Attribute ¶
type Attribute interface { IsLiteral() bool Type() cty.Type Value() cty.Value Range() Range Name() string Contains(checkValue interface{}, equalityOptions ...EqualityOption) bool StartsWith(prefix interface{}) bool EndsWith(suffix interface{}) bool Equals(checkValue interface{}, equalityOptions ...EqualityOption) bool RegexMatches(pattern interface{}) bool IsAny(options ...interface{}) bool IsNone(options ...interface{}) bool IsTrue() bool IsFalse() bool IsEmpty() bool MapValue(mapKey string) cty.Value LessThan(checkValue interface{}) bool LessThanOrEqualTo(checkValue interface{}) bool GreaterThan(checkValue interface{}) bool GreaterThanOrEqualTo(checkValue interface{}) bool IsDataBlockReference() bool Reference() (*Reference, error) IsResourceBlockReference(resourceType string) bool ReferencesBlock(b Block) bool IsResolvable() bool IsString() bool IsNumber() bool IsBool() bool ValueAsStrings() []string }
type Block ¶
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 TypeLabel() string NameLabel() string HasChild(childElement string) bool MissingChild(childElement string) bool InModule() bool Label() string HasBlock(childElement string) bool IsResourceType(resourceType string) bool IsEmpty() bool Values() cty.Value }
func NewHCLBlock ¶
type HCLAttribute ¶
type HCLAttribute struct {
// contains filtered or unexported fields
}
func NewHCLAttribute ¶
func NewHCLAttribute(attr *hcl.Attribute, ctx *hcl.EvalContext) *HCLAttribute
func (*HCLAttribute) Contains ¶
func (attr *HCLAttribute) Contains(checkValue interface{}, equalityOptions ...EqualityOption) bool
func (*HCLAttribute) EndsWith ¶
func (attr *HCLAttribute) EndsWith(suffix interface{}) bool
func (*HCLAttribute) Equals ¶
func (attr *HCLAttribute) Equals(checkValue interface{}, equalityOptions ...EqualityOption) bool
func (*HCLAttribute) GreaterThan ¶
func (attr *HCLAttribute) GreaterThan(checkValue interface{}) bool
func (*HCLAttribute) GreaterThanOrEqualTo ¶
func (attr *HCLAttribute) GreaterThanOrEqualTo(checkValue interface{}) bool
func (*HCLAttribute) IsAny ¶
func (attr *HCLAttribute) IsAny(options ...interface{}) bool
func (*HCLAttribute) IsBool ¶
func (attr *HCLAttribute) IsBool() bool
func (*HCLAttribute) IsDataBlockReference ¶
func (attr *HCLAttribute) IsDataBlockReference() bool
func (*HCLAttribute) IsEmpty ¶
func (attr *HCLAttribute) IsEmpty() bool
func (*HCLAttribute) IsFalse ¶
func (attr *HCLAttribute) IsFalse() bool
func (*HCLAttribute) IsLiteral ¶
func (attr *HCLAttribute) IsLiteral() bool
func (*HCLAttribute) IsNone ¶
func (attr *HCLAttribute) IsNone(options ...interface{}) bool
func (*HCLAttribute) IsNumber ¶
func (attr *HCLAttribute) IsNumber() bool
func (*HCLAttribute) IsResolvable ¶
func (attr *HCLAttribute) IsResolvable() bool
func (*HCLAttribute) IsResourceBlockReference ¶
func (attr *HCLAttribute) IsResourceBlockReference(resourceType string) bool
func (*HCLAttribute) IsString ¶
func (attr *HCLAttribute) IsString() bool
func (*HCLAttribute) IsTrue ¶
func (attr *HCLAttribute) IsTrue() bool
func (*HCLAttribute) LessThan ¶
func (attr *HCLAttribute) LessThan(checkValue interface{}) bool
func (*HCLAttribute) LessThanOrEqualTo ¶
func (attr *HCLAttribute) LessThanOrEqualTo(checkValue interface{}) bool
func (*HCLAttribute) Name ¶
func (attr *HCLAttribute) Name() string
func (*HCLAttribute) Range ¶
func (attr *HCLAttribute) Range() Range
func (*HCLAttribute) Reference ¶
func (attr *HCLAttribute) Reference() (*Reference, error)
func (*HCLAttribute) ReferencesBlock ¶
func (attr *HCLAttribute) ReferencesBlock(b Block) bool
func (*HCLAttribute) RegexMatches ¶
func (attr *HCLAttribute) RegexMatches(pattern interface{}) bool
func (*HCLAttribute) StartsWith ¶
func (attr *HCLAttribute) StartsWith(prefix interface{}) bool
func (*HCLAttribute) Type ¶
func (attr *HCLAttribute) Type() cty.Type
func (*HCLAttribute) Value ¶
func (attr *HCLAttribute) Value() (ctyVal cty.Value)
func (*HCLAttribute) ValueAsStrings ¶
func (attr *HCLAttribute) ValueAsStrings() []string
type HCLBlock ¶
type HCLBlock struct {
// contains filtered or unexported fields
}
func (*HCLBlock) AttachEvalContext ¶
func (block *HCLBlock) AttachEvalContext(ctx *hcl.EvalContext)
func (*HCLBlock) Attributes ¶
func (*HCLBlock) GetAttribute ¶
func (*HCLBlock) GetAttributes ¶
func (*HCLBlock) GetFirstMatchingBlock ¶
func (*HCLBlock) GetModuleBlock ¶
func (*HCLBlock) GetNestedAttribute ¶
func (*HCLBlock) HasModuleBlock ¶
func (*HCLBlock) IsResourceType ¶
func (*HCLBlock) MissingChild ¶
type Range ¶
type Range struct { Filename string `json:"filename"` StartLine int `json:"start_line"` EndLine int `json:"end_line"` }
Range describes an area of code, including the filename it is present in and the lin numbers the code occupies
Click to show internal directories.
Click to hide internal directories.