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) DslAbbreviation() string
- func (c *BaseConfig) DslFullName() string
- 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) ReadVariablesFromSingleVarFile(fileContent []byte, fileName string) (map[string]VariableValueRead, error)
- func (c *BaseConfig) RunPlan() error
- func (c *BaseConfig) RunPrePlan() error
- func (c *BaseConfig) ValidBlockAddress(address string) bool
- type BaseDecode
- type Block
- type BlockType
- type CliFlagAssignedVariable
- type CliFlagAssignedVariableFile
- type CliFlagAssignedVariables
- 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
- type Variable
- type VariableBlock
- func (v *VariableBlock) AddressLength() int
- func (v *VariableBlock) BlockType() string
- func (v *VariableBlock) CanExecutePrePlan() bool
- func (v *VariableBlock) Decode(block *HclBlock, context *hcl.EvalContext) error
- func (v *VariableBlock) ExecuteBeforePlan() error
- func (v *VariableBlock) ExecuteDuringPlan() error
- func (v *VariableBlock) Type() string
- func (v *VariableBlock) Value() cty.Value
- func (v *VariableBlock) Variable()
- type VariableValidation
- type VariableValueRead
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 NoValue = VariableValueRead{}
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, dslFullName, dslAbbreviation string, cliFlagAssignedVariables []CliFlagAssignedVariables, ctx context.Context) *BaseConfig
func (*BaseConfig) Context ¶
func (c *BaseConfig) Context() context.Context
func (*BaseConfig) DslAbbreviation ¶
func (c *BaseConfig) DslAbbreviation() string
func (*BaseConfig) DslFullName ¶
func (c *BaseConfig) DslFullName() string
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) ReadVariablesFromSingleVarFile ¶
func (c *BaseConfig) ReadVariablesFromSingleVarFile(fileContent []byte, fileName string) (map[string]VariableValueRead, error)
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 CliFlagAssignedVariable ¶
type CliFlagAssignedVariable struct {
// contains filtered or unexported fields
}
func NewCliFlagAssignedVariable ¶
func NewCliFlagAssignedVariable(varName, rawValue string) CliFlagAssignedVariable
func (CliFlagAssignedVariable) Variables ¶
func (v CliFlagAssignedVariable) Variables(c *BaseConfig) (map[string]VariableValueRead, error)
type CliFlagAssignedVariableFile ¶
type CliFlagAssignedVariableFile struct {
// contains filtered or unexported fields
}
func NewCliFlagAssignedVariableFile ¶
func NewCliFlagAssignedVariableFile(varFileName string) CliFlagAssignedVariableFile
func (CliFlagAssignedVariableFile) Variables ¶
func (v CliFlagAssignedVariableFile) Variables(c *BaseConfig) (map[string]VariableValueRead, error)
type CliFlagAssignedVariables ¶
type CliFlagAssignedVariables interface {
Variables(c *BaseConfig) (map[string]VariableValueRead, error)
}
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 ¶
type Variable ¶
type Variable interface { SingleValueBlock Variable() }
type VariableBlock ¶
type VariableBlock struct { *BaseBlock Description *string Validations []VariableValidation // contains filtered or unexported fields }
func (*VariableBlock) AddressLength ¶
func (v *VariableBlock) AddressLength() int
func (*VariableBlock) BlockType ¶
func (v *VariableBlock) BlockType() string
func (*VariableBlock) CanExecutePrePlan ¶
func (v *VariableBlock) CanExecutePrePlan() bool
func (*VariableBlock) Decode ¶
func (v *VariableBlock) Decode(block *HclBlock, context *hcl.EvalContext) error
func (*VariableBlock) ExecuteBeforePlan ¶
func (v *VariableBlock) ExecuteBeforePlan() error
func (*VariableBlock) ExecuteDuringPlan ¶
func (v *VariableBlock) ExecuteDuringPlan() error
func (*VariableBlock) Type ¶
func (v *VariableBlock) Type() string
func (*VariableBlock) Value ¶
func (v *VariableBlock) Value() cty.Value
func (*VariableBlock) Variable ¶
func (v *VariableBlock) Variable()
type VariableValidation ¶
type VariableValueRead ¶
func NewVariableValueRead ¶
func NewVariableValueRead(name string, value *cty.Value, err error) VariableValueRead
func (VariableValueRead) HasError ¶
func (r VariableValueRead) HasError() bool
Source Files ¶
- apply_block.go
- base_block.go
- base_config.go
- base_decode.go
- block.go
- block_register.go
- block_value.go
- cli_flag_assigned_variables.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
- var_file_parser.go
- variable.go
- variable_read.go
- variable_value_promoter.go
Click to show internal directories.
Click to hide internal directories.