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

     1  package otto
     2  
     3  // ExecuteTask is an enum of available tasks to execute.
     4  type ExecuteTask uint
     5  
     6  const (
     7  	ExecuteTaskInvalid ExecuteTask = 0
     8  	ExecuteTaskDev
     9  )
    10  
    11  //go:generate stringer -type=ExecuteTask execute.go
    12  
    13  // ExecuteOpts are the options used for executing generic tasks
    14  // on the Otto environment.
    15  type ExecuteOpts struct {
    16  	// Task is the task to execute
    17  	Task ExecuteTask
    18  
    19  	// Action is a sub-action that a task can take. For example:
    20  	// infrastructures accept "destroy", development environments
    21  	// accept "reload", etc.
    22  	Action string
    23  
    24  	// Args are additional arguments to the task
    25  	Args []string
    26  }