github.com/leowmjw/otto@v0.2.1-0.20160126165905-6400716cf085/context/context.go (about)

     1  package context
     2  
     3  import (
     4  	"github.com/hashicorp/otto/appfile"
     5  	"github.com/hashicorp/otto/directory"
     6  	"github.com/hashicorp/otto/ui"
     7  )
     8  
     9  // Shared is the shared contexts for app/infra.
    10  type Shared struct {
    11  	// InfraCreds are the credentials for working with the infrastructure.
    12  	// These are guaranteed to be populated for the following function
    13  	// calls:
    14  	//
    15  	//   App.Build
    16  	//   TODO
    17  	//
    18  	InfraCreds map[string]string
    19  
    20  	// Ui is the Ui object that can be used to communicate with the user.
    21  	Ui ui.Ui
    22  
    23  	// Directory is the directory service. This is available during
    24  	// both execution and compilation and can be used to view the
    25  	// global data prior to doing anything.
    26  	Directory directory.Backend
    27  
    28  	// InstallDir is the directory where binaries can be installed. Consider
    29  	// this directory a cache: Otto may remove it at any point, although
    30  	// unlikely. And you're responsible to clean up anything in here.
    31  	InstallDir string
    32  
    33  	// Appfile is the full appfile
    34  	Appfile *appfile.File
    35  
    36  	// FoundationDirs are the directories of the various foundation scripts.
    37  	//
    38  	// These directories will contain a "dev" and "deploy" subdirectory
    39  	// that should be uploaded and used for each of those environments.
    40  	// Within those folders, a "main.sh" file will exist that should be
    41  	// called.
    42  	FoundationDirs []string
    43  }