github.com/JarrahG/buffalocli@v0.0.0-20230801092127-b85bfd5d395a/internal/plugins/command.go (about)

     1  package plugins
     2  
     3  // Command that the plugin supplies
     4  type Command struct {
     5  	// Name "foo"
     6  	Name string `json:"name"`
     7  	// UseCommand "bar"
     8  	UseCommand string `json:"use_command"`
     9  	// BuffaloCommand "generate"
    10  	BuffaloCommand string `json:"buffalo_command"`
    11  	// Description "generates a foo"
    12  	Description string   `json:"description,omitempty"`
    13  	Aliases     []string `json:"aliases,omitempty"`
    14  	Binary      string   `json:"-"`
    15  	Flags       []string `json:"flags,omitempty"`
    16  	// Filters events to listen to ("" or "*") is all events
    17  	ListenFor string `json:"listen_for,omitempty"`
    18  }
    19  
    20  // Commands is a slice of Command
    21  type Commands []Command