Documentation ¶
Index ¶
- Variables
- func IsValidBlockReference(name string) bool
- func IsValidType(name string) bool
- type Attribute
- func (a *Attribute) AllReferences(blocks ...*Block) []*Reference
- func (a *Attribute) AsBoolValueOrDefault(defaultValue bool, parent *Block) types.BoolValue
- func (a *Attribute) AsBytesValueOrDefault(defaultValue []byte, parent *Block) types.BytesValue
- func (a *Attribute) AsIntValueOrDefault(defaultValue int, parent *Block) types.IntValue
- func (a *Attribute) AsStringValueOrDefault(defaultValue string, parent *Block) types.StringValue
- func (a *Attribute) Contains(checkValue interface{}, equalityOptions ...EqualityOption) bool
- func (a *Attribute) Each(f func(key cty.Value, val cty.Value)) error
- func (a *Attribute) EndsWith(suffix interface{}) bool
- func (a *Attribute) Equals(checkValue interface{}, equalityOptions ...EqualityOption) bool
- func (a *Attribute) GetMetadata() types.Metadata
- func (a *Attribute) GetRawValue() interface{}
- func (a *Attribute) GreaterThan(checkValue interface{}) bool
- func (a *Attribute) GreaterThanOrEqualTo(checkValue interface{}) bool
- func (a *Attribute) HasIntersect(checkValues ...interface{}) bool
- func (a *Attribute) IsAny(options ...interface{}) bool
- func (a *Attribute) IsBool() bool
- func (a *Attribute) IsDataBlockReference() bool
- func (a *Attribute) IsEmpty() bool
- func (a *Attribute) IsFalse() bool
- func (a *Attribute) IsIterable() bool
- func (a *Attribute) IsLiteral() bool
- func (a *Attribute) IsNil() bool
- func (a *Attribute) IsNone(options ...interface{}) bool
- func (a *Attribute) IsNotAny(options ...interface{}) bool
- func (a *Attribute) IsNotEmpty() bool
- func (a *Attribute) IsNotNil() bool
- func (a *Attribute) IsNotResolvable() bool
- func (a *Attribute) IsNumber() bool
- func (a *Attribute) IsResolvable() bool
- func (a *Attribute) IsResourceBlockReference(resourceType string) bool
- func (a *Attribute) IsString() bool
- func (a *Attribute) IsTrue() bool
- func (a *Attribute) LessThan(checkValue interface{}) bool
- func (a *Attribute) LessThanOrEqualTo(checkValue interface{}) bool
- func (a *Attribute) MapValue(mapKey string) cty.Value
- func (a *Attribute) Name() string
- func (a *Attribute) NotContains(checkValue interface{}, equalityOptions ...EqualityOption) bool
- func (a *Attribute) NotEqual(checkValue interface{}, equalityOptions ...EqualityOption) bool
- func (a *Attribute) References(r types.Reference) bool
- func (a *Attribute) ReferencesBlock(b *Block) bool
- func (a *Attribute) RegexMatches(re regexp.Regexp) bool
- func (a *Attribute) StartsWith(prefix interface{}) bool
- func (a *Attribute) Type() cty.Type
- func (a *Attribute) Value() (ctyVal cty.Value)
- func (a *Attribute) ValueAsStrings() []string
- type Block
- func (b *Block) AllBlocks() Blocks
- func (b *Block) Attributes() map[string]*Attribute
- func (b *Block) Clone(index cty.Value) *Block
- func (b *Block) Context() *context.Context
- func (b *Block) FullName() string
- func (b *Block) GetAttribute(name string) *Attribute
- func (b *Block) GetAttributes() []*Attribute
- func (b *Block) GetBlock(name string) *Block
- func (b *Block) GetBlocks(name string) Blocks
- func (b *Block) GetFirstMatchingBlock(names ...string) *Block
- func (b *Block) GetMetadata() types.Metadata
- func (b *Block) GetNestedAttribute(name string) *Attribute
- func (b *Block) GetRawValue() interface{}
- func (b *Block) HasChild(childElement string) bool
- func (b *Block) ID() string
- func (b *Block) InModule() bool
- func (b *Block) InjectBlock(block *Block, name string)
- func (b *Block) IsCountExpanded() bool
- func (b *Block) IsEmpty() bool
- func (b *Block) IsNil() bool
- func (b *Block) IsNotNil() bool
- func (b *Block) IsResourceType(resourceType string) bool
- func (b *Block) Label() string
- func (b *Block) Labels() []string
- func (b *Block) LocalName() string
- func (b *Block) MissingChild(childElement string) bool
- func (b *Block) MissingNestedChild(name string) bool
- func (b *Block) NameLabel() string
- func (b *Block) OverrideContext(ctx *context.Context)
- func (b *Block) Type() string
- func (b *Block) TypeLabel() string
- func (b *Block) UniqueName() string
- func (b *Block) Values() cty.Value
- type Blocks
- type EqualityOption
- type Ignore
- type Ignores
- type Module
- func (c *Module) GetBlocks() Blocks
- func (h *Module) GetBlocksByTypeLabel(typeLabel string) Blocks
- func (c *Module) GetDatasByType(label string) Blocks
- func (c *Module) GetProviderBlocksByProvider(providerName string, alias string) Blocks
- func (c *Module) GetReferencedBlock(referringAttr *Attribute, parentBlock *Block) (*Block, error)
- func (c *Module) GetReferencingBlocks(originalBlock *Block, referencingType string, referencingLabel string, ...) Blocks
- func (c *Module) GetReferencingResources(originalBlock *Block, referencingLabel string, referencingAttributeName string) Blocks
- func (c *Module) GetResourcesByIDs(ids ...string) Blocks
- func (c *Module) GetResourcesByType(labels ...string) Blocks
- func (c *Module) GetsModulesBySource(moduleSource string) (Blocks, error)
- func (c *Module) Ignores() Ignores
- type Modules
- func (m Modules) GetBlockByIgnoreRange(r types.Range) *Block
- func (m Modules) GetBlocks() Blocks
- func (m Modules) GetChildResourceIDMapByType(typeLabels ...string) ResourceIDResolutions
- func (m Modules) GetReferencedBlock(referringAttr *Attribute, parentBlock *Block) (*Block, error)
- func (m Modules) GetReferencingResources(originalBlock *Block, referencingLabel string, referencingAttributeName string) Blocks
- func (m Modules) GetResourceByIDs(id ...string) Blocks
- func (m Modules) GetResourcesByType(typeLabel ...string) Blocks
- type Reference
- func (r *Reference) BlockType() Type
- func (r *Reference) HumanReadable() string
- func (r *Reference) Key() string
- func (r *Reference) KeyBracketed() string
- func (r *Reference) LogicalID() string
- func (r *Reference) NameLabel() string
- func (r *Reference) RawKey() cty.Value
- func (r *Reference) RefersTo(a types.Reference) bool
- func (r *Reference) SetKey(key cty.Value)
- func (r *Reference) String() string
- func (r *Reference) TypeLabel() string
- type ResourceIDResolutions
- type Type
Constants ¶
This section is empty.
Variables ¶
View Source
var Schema = &hcl.BodySchema{ Blocks: []hcl.BlockHeaderSchema{ { Type: "terraform", }, { Type: "required_providers", }, { Type: "provider", LabelNames: []string{"name"}, }, { Type: "variable", LabelNames: []string{"name"}, }, { Type: "locals", }, { Type: "output", LabelNames: []string{"name"}, }, { Type: "module", LabelNames: []string{"name"}, }, { Type: "resource", LabelNames: []string{"type", "name"}, }, { Type: "data", LabelNames: []string{"type", "name"}, }, { Type: "moved", }, }, }
Schema is regularly lifted from terraform source to ensure compatibility
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 TypeMoved = 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, TypeMoved, TypeOutput, TypeProvider, TypeResource, TypeTerraform, TypeVariable, }
Functions ¶
func IsValidBlockReference ¶
func IsValidType ¶
Types ¶
type Attribute ¶
type Attribute struct {
// contains filtered or unexported fields
}
func NewAttribute ¶
func (*Attribute) AllReferences ¶
func (*Attribute) AsBoolValueOrDefault ¶
func (*Attribute) AsBytesValueOrDefault ¶
func (a *Attribute) AsBytesValueOrDefault(defaultValue []byte, parent *Block) types.BytesValue
func (*Attribute) AsIntValueOrDefault ¶
func (*Attribute) AsStringValueOrDefault ¶
func (a *Attribute) AsStringValueOrDefault(defaultValue string, parent *Block) types.StringValue
func (*Attribute) Contains ¶
func (a *Attribute) Contains(checkValue interface{}, equalityOptions ...EqualityOption) bool
func (*Attribute) Equals ¶
func (a *Attribute) Equals(checkValue interface{}, equalityOptions ...EqualityOption) bool
func (*Attribute) GetMetadata ¶
func (*Attribute) GetRawValue ¶
func (a *Attribute) GetRawValue() interface{}
func (*Attribute) GreaterThan ¶
func (*Attribute) GreaterThanOrEqualTo ¶
func (*Attribute) HasIntersect ¶
func (*Attribute) IsDataBlockReference ¶
func (*Attribute) IsIterable ¶
func (*Attribute) IsNotEmpty ¶
func (*Attribute) IsNotResolvable ¶
func (*Attribute) IsResolvable ¶
func (*Attribute) IsResourceBlockReference ¶
func (*Attribute) LessThanOrEqualTo ¶
func (*Attribute) NotContains ¶
func (a *Attribute) NotContains(checkValue interface{}, equalityOptions ...EqualityOption) bool
func (*Attribute) NotEqual ¶
func (a *Attribute) NotEqual(checkValue interface{}, equalityOptions ...EqualityOption) bool
func (*Attribute) ReferencesBlock ¶
func (*Attribute) StartsWith ¶
func (*Attribute) ValueAsStrings ¶
type Block ¶
type Block struct {
// contains filtered or unexported fields
}
func (*Block) Attributes ¶
func (*Block) GetAttribute ¶
func (*Block) GetAttributes ¶
func (*Block) GetFirstMatchingBlock ¶
func (*Block) GetMetadata ¶
func (*Block) GetNestedAttribute ¶
func (*Block) GetRawValue ¶
func (b *Block) GetRawValue() interface{}
func (*Block) InjectBlock ¶
func (*Block) IsCountExpanded ¶
func (*Block) IsResourceType ¶
func (*Block) MissingChild ¶
func (*Block) MissingNestedChild ¶
func (*Block) OverrideContext ¶
func (*Block) UniqueName ¶
type Ignore ¶
type Ignore struct { Range types.Range RuleID string Expiry *time.Time Workspace string Block bool Params map[string]string }
func (Ignore) MatchParams ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func (*Module) GetBlocksByTypeLabel ¶
func (*Module) GetDatasByType ¶
func (*Module) GetProviderBlocksByProvider ¶
func (*Module) GetReferencedBlock ¶
func (*Module) GetReferencingBlocks ¶
func (*Module) GetReferencingResources ¶
func (*Module) GetResourcesByIDs ¶
func (*Module) GetResourcesByType ¶
func (*Module) GetsModulesBySource ¶
type Modules ¶
type Modules []*Module
func (Modules) GetChildResourceIDMapByType ¶
func (m Modules) GetChildResourceIDMapByType(typeLabels ...string) ResourceIDResolutions
func (Modules) GetReferencedBlock ¶
func (Modules) GetReferencingResources ¶
func (Modules) GetResourceByIDs ¶
func (Modules) GetResourcesByType ¶
type Reference ¶
type Reference struct {
// contains filtered or unexported fields
}
func (*Reference) HumanReadable ¶
func (*Reference) KeyBracketed ¶
type ResourceIDResolutions ¶
func (ResourceIDResolutions) Orphans ¶
func (r ResourceIDResolutions) Orphans() (orphanIDs []string)
func (ResourceIDResolutions) Resolve ¶
func (r ResourceIDResolutions) Resolve(id string)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
funcs
Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/marks Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs
|
Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/marks Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs |
Click to show internal directories.
Click to hide internal directories.