Feature: Allow to install plugins through configuration (#91790)

This commit is contained in:
Andres Martinez Gotor
2024-08-13 16:57:55 +02:00
committed by GitHub
parent b03a709500
commit 9067797eb4
5 changed files with 226 additions and 13 deletions
+3 -3
View File
@@ -21,7 +21,7 @@ import (
type FakePluginInstaller struct {
AddFunc func(ctx context.Context, pluginID, version string, opts plugins.CompatOpts) error
// Remove removes a plugin from the store.
RemoveFunc func(ctx context.Context, pluginID string) error
RemoveFunc func(ctx context.Context, pluginID, version string) error
}
func (i *FakePluginInstaller) Add(ctx context.Context, pluginID, version string, opts plugins.CompatOpts) error {
@@ -31,9 +31,9 @@ func (i *FakePluginInstaller) Add(ctx context.Context, pluginID, version string,
return nil
}
func (i *FakePluginInstaller) Remove(ctx context.Context, pluginID string) error {
func (i *FakePluginInstaller) Remove(ctx context.Context, pluginID, version string) error {
if i.RemoveFunc != nil {
return i.RemoveFunc(ctx, pluginID)
return i.RemoveFunc(ctx, pluginID, version)
}
return nil
}