github.com/tomaszheflik/terraform@v0.7.3-0.20160827060421-32f990b41594/terraform/transform.go (about) 1 package terraform 2 3 import ( 4 "github.com/hashicorp/terraform/dag" 5 ) 6 7 // GraphTransformer is the interface that transformers implement. This 8 // interface is only for transforms that need entire graph visibility. 9 type GraphTransformer interface { 10 Transform(*Graph) error 11 } 12 13 // GraphVertexTransformer is an interface that transforms a single 14 // Vertex within with graph. This is a specialization of GraphTransformer 15 // that makes it easy to do vertex replacement. 16 // 17 // The GraphTransformer that runs through the GraphVertexTransformers is 18 // VertexTransformer. 19 type GraphVertexTransformer interface { 20 Transform(dag.Vertex) (dag.Vertex, error) 21 }