terraform: remove GraphConfigNodeType
This commit is contained in:
parent
31c813fa51
commit
513ff88859
|
@ -14,10 +14,6 @@ type graphNodeConfig interface {
|
||||||
// be depended on.
|
// be depended on.
|
||||||
GraphNodeDependable
|
GraphNodeDependable
|
||||||
GraphNodeDependent
|
GraphNodeDependent
|
||||||
|
|
||||||
// ConfigType returns the type of thing in the configuration that
|
|
||||||
// this node represents, such as a resource, module, etc.
|
|
||||||
ConfigType() GraphNodeConfigType
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// GraphNodeAddressable is an interface that all graph nodes for the
|
// GraphNodeAddressable is an interface that all graph nodes for the
|
||||||
|
|
|
@ -44,10 +44,6 @@ func (n *GraphNodeConfigResource) Copy() *GraphNodeConfigResource {
|
||||||
return ncr
|
return ncr
|
||||||
}
|
}
|
||||||
|
|
||||||
func (n *GraphNodeConfigResource) ConfigType() GraphNodeConfigType {
|
|
||||||
return GraphNodeConfigTypeResource
|
|
||||||
}
|
|
||||||
|
|
||||||
func (n *GraphNodeConfigResource) DependableName() []string {
|
func (n *GraphNodeConfigResource) DependableName() []string {
|
||||||
return []string{n.Resource.Id()}
|
return []string{n.Resource.Id()}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
package terraform
|
|
||||||
|
|
||||||
//go:generate stringer -type=GraphNodeConfigType graph_config_node_type.go
|
|
||||||
|
|
||||||
// GraphNodeConfigType is an enum for the type of thing that a graph
|
|
||||||
// node represents from the configuration.
|
|
||||||
type GraphNodeConfigType int
|
|
||||||
|
|
||||||
const (
|
|
||||||
GraphNodeConfigTypeInvalid GraphNodeConfigType = 0
|
|
||||||
GraphNodeConfigTypeResource GraphNodeConfigType = iota
|
|
||||||
GraphNodeConfigTypeProvider
|
|
||||||
GraphNodeConfigTypeModule
|
|
||||||
GraphNodeConfigTypeOutput
|
|
||||||
GraphNodeConfigTypeVariable
|
|
||||||
)
|
|
|
@ -28,10 +28,6 @@ func (n *GraphNodeConfigVariable) Name() string {
|
||||||
return fmt.Sprintf("var.%s", n.Variable.Name)
|
return fmt.Sprintf("var.%s", n.Variable.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (n *GraphNodeConfigVariable) ConfigType() GraphNodeConfigType {
|
|
||||||
return GraphNodeConfigTypeVariable
|
|
||||||
}
|
|
||||||
|
|
||||||
func (n *GraphNodeConfigVariable) DependableName() []string {
|
func (n *GraphNodeConfigVariable) DependableName() []string {
|
||||||
return []string{n.Name()}
|
return []string{n.Name()}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
// Code generated by "stringer -type=GraphNodeConfigType graph_config_node_type.go"; DO NOT EDIT
|
|
||||||
|
|
||||||
package terraform
|
|
||||||
|
|
||||||
import "fmt"
|
|
||||||
|
|
||||||
const _GraphNodeConfigType_name = "GraphNodeConfigTypeInvalidGraphNodeConfigTypeResourceGraphNodeConfigTypeProviderGraphNodeConfigTypeModuleGraphNodeConfigTypeOutputGraphNodeConfigTypeVariable"
|
|
||||||
|
|
||||||
var _GraphNodeConfigType_index = [...]uint8{0, 26, 53, 80, 105, 130, 157}
|
|
||||||
|
|
||||||
func (i GraphNodeConfigType) String() string {
|
|
||||||
if i < 0 || i >= GraphNodeConfigType(len(_GraphNodeConfigType_index)-1) {
|
|
||||||
return fmt.Sprintf("GraphNodeConfigType(%d)", i)
|
|
||||||
}
|
|
||||||
return _GraphNodeConfigType_name[_GraphNodeConfigType_index[i]:_GraphNodeConfigType_index[i+1]]
|
|
||||||
}
|
|
|
@ -39,11 +39,6 @@ func (n *graphNodeExpandedResource) ResourceAddress() *ResourceAddress {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// graphNodeConfig impl.
|
|
||||||
func (n *graphNodeExpandedResource) ConfigType() GraphNodeConfigType {
|
|
||||||
return GraphNodeConfigTypeResource
|
|
||||||
}
|
|
||||||
|
|
||||||
// GraphNodeDependable impl.
|
// GraphNodeDependable impl.
|
||||||
func (n *graphNodeExpandedResource) DependableName() []string {
|
func (n *graphNodeExpandedResource) DependableName() []string {
|
||||||
return []string{
|
return []string{
|
||||||
|
@ -139,11 +134,6 @@ func (n *graphNodeExpandedResourceDestroy) Name() string {
|
||||||
return fmt.Sprintf("%s (destroy)", n.graphNodeExpandedResource.Name())
|
return fmt.Sprintf("%s (destroy)", n.graphNodeExpandedResource.Name())
|
||||||
}
|
}
|
||||||
|
|
||||||
// graphNodeConfig impl.
|
|
||||||
func (n *graphNodeExpandedResourceDestroy) ConfigType() GraphNodeConfigType {
|
|
||||||
return GraphNodeConfigTypeResource
|
|
||||||
}
|
|
||||||
|
|
||||||
// GraphNodeEvalable impl.
|
// GraphNodeEvalable impl.
|
||||||
func (n *graphNodeExpandedResourceDestroy) EvalTree() EvalNode {
|
func (n *graphNodeExpandedResourceDestroy) EvalTree() EvalNode {
|
||||||
info := n.instanceInfo()
|
info := n.instanceInfo()
|
||||||
|
|
Loading…
Reference in New Issue