github.com/mohanarpit/terraform@v0.6.16-0.20160909104007-291f29853544/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  }