Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ValidPluginFilenamePrefixes = []string{"ankor"}
Functions ¶
func ShouldSkipOnLookPathErr ¶
Types ¶
type Completion ¶
type Completion interface { SetupCompletion() error SetPlugins(plugins []index.Plugin) GetPlugins() []index.Plugin SetArgs(args []string) GetArgs() []string }
func NewCompletion ¶
func NewCompletion(path environment.Environment, cmd *cobra.Command, args []string) Completion
type DefaultPluginHandler ¶
type DefaultPluginHandler struct {
ValidPrefixes []string
}
DefaultPluginHandler implements Handler
func NewDefaultPluginHandler ¶
func NewDefaultPluginHandler(validPrefixes []string) *DefaultPluginHandler
NewDefaultPluginHandler instantiates the DefaultPluginHandler with a list of given filename prefixes used to identify valid plugin filenames.
type Handler ¶
type Handler interface { // Lookup exists at the given filename, or a boolean false. // Lookup will iterate over a list of given prefixes // in order to recognize valid plugin filenames. // The first filepath to match a prefix is returned. Lookup(filename string) (string, bool) // Execute receives an executable's filepath, a slice // of arguments, and a slice of environment variables // to relay to the executable. Execute(executablePath string, cmdArgs, environment []string) error }
Handler is capable of parsing command line arguments and performing executable filename lookups to search for valid plugin files, and execute found plugins.
Click to show internal directories.
Click to hide internal directories.