Run executes the NewPluginDescribe action
(_ context.Context, pluginName string)
| 111 | |
| 112 | // Run executes the NewPluginDescribe action |
| 113 | func (action *PluginDescribe) Run(_ context.Context, pluginName string) (*PluginDescribeResult, error) { |
| 114 | action.cfg.Logger.Debug().Str("pluginName", pluginName).Msg("Getting plugin info") |
| 115 | plugin, ok := action.manager.GetPlugin(pluginName) |
| 116 | if !ok { |
| 117 | return nil, fmt.Errorf("plugin '%s' not found", pluginName) |
| 118 | } |
| 119 | |
| 120 | action.cfg.Logger.Debug().Str("pluginName", pluginName).Str("version", plugin.Metadata.Version).Int("commandCount", len(plugin.Metadata.Commands)).Msg("Found plugin") |
| 121 | return &PluginDescribeResult{ |
| 122 | Plugin: plugin, |
| 123 | }, nil |
| 124 | } |
| 125 | |
| 126 | // NewPluginExec creates a new PluginExec action |
| 127 | func NewPluginExec(cfg *ActionsOpts, manager *plugins.Manager) *PluginExec { |