github.com/bhameyie/otto@v0.2.1-0.20160406174117-16052efa52ec/helper/hashitools/installer.go (about)

     1  package hashitools
     2  
     3  import (
     4  	"github.com/hashicorp/go-version"
     5  )
     6  
     7  // Installer is the interface that knows how to install things.
     8  //
     9  // This is an interface to support different installation methods between
    10  // our different projects.
    11  type Installer interface {
    12  	// InstallAsk should ask the user if they'd like to install the
    13  	// project. This is only called if installation is actually required.
    14  	InstallAsk(installed, required, latest *version.Version) (bool, error)
    15  
    16  	// Install should install the specified version.
    17  	Install(*version.Version) error
    18  
    19  	// Path is the path to the installed main binary of this project,
    20  	// or "" if it doesn't seem installed.
    21  	Path() string
    22  }