Documentation ¶
Index ¶
- Variables
- func BlockToString(f Block) string
- func Blocks[T Block](c directedAcyclicGraph) []T
- func CtyValueToString(val cty.Value) string
- func Decode(b Block) error
- func GoTypeToCtyType(goType reflect.Type) cty.Type
- func InitConfig(config Config, hclBlocks []*HclBlock) error
- func Int(i int) *int
- func IsBlockTypeWanted(bt string) bool
- func RegisterBaseBlock(factory func() BlockType)
- func RegisterBlock(t Block)
- func SingleValues(blocks []SingleValueBlock) cty.Value
- func ToCtyValue(input any) cty.Value
- func Value(b Block) map[string]cty.Value
- func Values[T Block](blocks []T) cty.Value
- type ApplyBlock
- type BaseBlock
- func (bb *BaseBlock) Address() string
- func (bb *BaseBlock) BaseValues() map[string]cty.Value
- func (bb *BaseBlock) Config() Config
- func (bb *BaseBlock) Context() context.Context
- func (bb *BaseBlock) EvalContext() *hcl.EvalContext
- func (bb *BaseBlock) HclBlock() *HclBlock
- func (bb *BaseBlock) Id() string
- func (bb *BaseBlock) Name() string
- func (bb *BaseBlock) PreConditionCheck(ctx *hcl.EvalContext) ([]PreCondition, error)
- type BaseConfig
- func (c *BaseConfig) Context() context.Context
- func (c *BaseConfig) EvalContext() *hcl.EvalContext
- func (c *BaseConfig) GetAncestors(id string) (map[string]interface{}, error)
- func (c *BaseConfig) GetChildren(id string) (map[string]interface{}, error)
- func (c *BaseConfig) GetVertices() map[string]interface{}
- func (c *BaseConfig) RunPlan() error
- func (c *BaseConfig) RunPrePlan() error
- func (c *BaseConfig) ValidBlockAddress(address string) bool
- type BaseDecode
- type Block
- type BlockType
- type Config
- type CustomDecode
- type Dag
- type ForEach
- type HclAttribute
- type HclBlock
- type Local
- type LocalBlock
- func (l *LocalBlock) AddressLength() int
- func (l *LocalBlock) BlockType() string
- func (l *LocalBlock) CanExecutePrePlan() bool
- func (l *LocalBlock) ExecuteBeforePlan() error
- func (l *LocalBlock) ExecuteDuringPlan() error
- func (l *LocalBlock) Local()
- func (l *LocalBlock) Type() string
- func (l *LocalBlock) Value() cty.Value
- type Plan
- type PlanBlock
- type PreCondition
- type PrePlanBlock
- type SingleValueBlock
- type Valuable
Constants ¶
This section is empty.
Variables ¶
View Source
var MetaAttributeNames = hashset.New("for_each", "depends_on")
View Source
var MetaNestedBlockNames = hashset.New("precondition", "dynamic")
View Source
var Validate = validator.New(validator.WithRequiredStructEnabled())
Functions ¶
func BlockToString ¶
func CtyValueToString ¶
func InitConfig ¶
func IsBlockTypeWanted ¶
func RegisterBaseBlock ¶
func RegisterBaseBlock(factory func() BlockType)
func RegisterBlock ¶
func RegisterBlock(t Block)
func SingleValues ¶
func SingleValues(blocks []SingleValueBlock) cty.Value
func ToCtyValue ¶
ToCtyValue is a function that converts a primary/collection type to cty.Value
Types ¶
type ApplyBlock ¶
type BaseBlock ¶
type BaseBlock struct {
// contains filtered or unexported fields
}
func NewBaseBlock ¶
func (*BaseBlock) EvalContext ¶
func (bb *BaseBlock) EvalContext() *hcl.EvalContext
func (*BaseBlock) PreConditionCheck ¶
func (bb *BaseBlock) PreConditionCheck(ctx *hcl.EvalContext) ([]PreCondition, error)
type BaseConfig ¶
type BaseConfig struct {
// contains filtered or unexported fields
}
func NewBasicConfig ¶
func NewBasicConfig(basedir string, ctx context.Context) *BaseConfig
func (*BaseConfig) Context ¶
func (c *BaseConfig) Context() context.Context
func (*BaseConfig) EvalContext ¶
func (c *BaseConfig) EvalContext() *hcl.EvalContext
func (*BaseConfig) GetAncestors ¶
func (c *BaseConfig) GetAncestors(id string) (map[string]interface{}, error)
func (*BaseConfig) GetChildren ¶
func (c *BaseConfig) GetChildren(id string) (map[string]interface{}, error)
func (*BaseConfig) GetVertices ¶
func (c *BaseConfig) GetVertices() map[string]interface{}
func (*BaseConfig) RunPlan ¶
func (c *BaseConfig) RunPlan() error
func (*BaseConfig) RunPrePlan ¶
func (c *BaseConfig) RunPrePlan() error
func (*BaseConfig) ValidBlockAddress ¶
func (c *BaseConfig) ValidBlockAddress(address string) bool
type BaseDecode ¶
type Block ¶
type Block interface { Id() string Name() string Type() string BlockType() string Address() string HclBlock() *HclBlock EvalContext() *hcl.EvalContext BaseValues() map[string]cty.Value PreConditionCheck(*hcl.EvalContext) ([]PreCondition, error) AddressLength() int CanExecutePrePlan() bool Config() Config // contains filtered or unexported methods }
type CustomDecode ¶
type HclAttribute ¶
func NewHclAttribute ¶
func NewHclAttribute(ra *hclsyntax.Attribute, wa *hclwrite.Attribute) *HclAttribute
func (*HclAttribute) ExprString ¶
func (ha *HclAttribute) ExprString() string
func (*HclAttribute) ExprTokens ¶
func (ha *HclAttribute) ExprTokens() hclwrite.Tokens
type HclBlock ¶
func AsHclBlocks ¶
func NewHclBlock ¶
func (*HclBlock) Attributes ¶
func (hb *HclBlock) Attributes() map[string]*HclAttribute
func (*HclBlock) NestedBlocks ¶
type Local ¶
type Local interface { SingleValueBlock // discriminator func Local() }
type LocalBlock ¶
func (*LocalBlock) AddressLength ¶
func (l *LocalBlock) AddressLength() int
func (*LocalBlock) BlockType ¶
func (l *LocalBlock) BlockType() string
func (*LocalBlock) CanExecutePrePlan ¶
func (l *LocalBlock) CanExecutePrePlan() bool
func (*LocalBlock) ExecuteBeforePlan ¶
func (l *LocalBlock) ExecuteBeforePlan() error
func (*LocalBlock) ExecuteDuringPlan ¶
func (l *LocalBlock) ExecuteDuringPlan() error
func (*LocalBlock) Local ¶
func (l *LocalBlock) Local()
func (*LocalBlock) Type ¶
func (l *LocalBlock) Type() string
func (*LocalBlock) Value ¶
func (l *LocalBlock) Value() cty.Value
type PreCondition ¶
type PrePlanBlock ¶
type PrePlanBlock interface {
ExecuteBeforePlan() error
}
type SingleValueBlock ¶
Source Files ¶
- apply_block.go
- base_block.go
- base_config.go
- base_decode.go
- block.go
- block_register.go
- block_value.go
- config.go
- cty.go
- custom_decode.go
- dag.go
- dag_walker.go
- hcl_attribute.go
- hcl_block.go
- init.go
- local.go
- plan.go
- plan_block.go
- pre_condition.go
- pre_plan_block.go
- rf_iterate.go
- single_value_block.go
- validate.go
- valuable.go
Click to show internal directories.
Click to hide internal directories.