github.com/jerryclinesmith/packer@v0.3.7/command/fix/fixer.go (about)

     1  package fix
     2  
     3  // A Fixer is something that can perform a fix operation on a template.
     4  type Fixer interface {
     5  	// Fix takes a raw map structure input, potentially transforms it
     6  	// in some way, and returns the new, transformed structure. The
     7  	// Fix method is allowed to mutate the input.
     8  	Fix(input map[string]interface{}) (map[string]interface{}, error)
     9  }
    10  
    11  // Fixers is the map of all available fixers, by name.
    12  var Fixers map[string]Fixer
    13  
    14  func init() {
    15  	Fixers = map[string]Fixer{
    16  		"iso-md5":    new(FixerISOMD5),
    17  		"createtime": new(FixerCreateTime),
    18  	}
    19  }