Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidBundleCommandPair is returned by FindCommandEntry when the // command entry string doesn't look like "command" or "bundle:command". ErrInvalidBundleCommandPair = errors.New("invalid bundle:comand pair") )
Functions ¶
func SplitCommand ¶
SplitCommand accepts a string in the style of "bundle:command" or "command" and returns the bundle and command as a pair of strings. If there's no indicated bundle, the bundle string (the first string) will be empty. If there's more than one colon, an error will be returned.
Types ¶
type CommandEntryFinder ¶
type CommandEntryFinder interface {
FindCommandEntry(ctx context.Context, bundle, command string) ([]data.CommandEntry, error)
}
FindCommandEntry is used to find the enabled commands with the provided bundle and command names. If either is empty, it is treated as a wildcard. Importantly, this must only return ENABLED commands!
Click to show internal directories.
Click to hide internal directories.