add core plugins thru store (#43085)
This commit is contained in:
@@ -18,11 +18,15 @@ type Store interface {
|
||||
Plugins(ctx context.Context, pluginTypes ...Type) []PluginDTO
|
||||
|
||||
// Add adds a plugin to the store.
|
||||
Add(ctx context.Context, pluginID, version string, opts AddOpts) error
|
||||
Add(ctx context.Context, pluginID, version string) error
|
||||
// AddWithFactory adds a plugin to the store.
|
||||
AddWithFactory(ctx context.Context, pluginID string, factory backendplugin.PluginFactoryFunc, resolver PluginPathResolver) error
|
||||
// Remove removes a plugin from the store.
|
||||
Remove(ctx context.Context, pluginID string) error
|
||||
}
|
||||
|
||||
type PluginPathResolver func() (string, error)
|
||||
|
||||
type AddOpts struct {
|
||||
PluginInstallDir, PluginZipURL, PluginRepoURL string
|
||||
}
|
||||
@@ -66,11 +70,6 @@ type RendererManager interface {
|
||||
Renderer() *Plugin
|
||||
}
|
||||
|
||||
type CoreBackendRegistrar interface {
|
||||
// LoadAndRegister loads and registers a Core backend plugin
|
||||
LoadAndRegister(pluginID string, factory backendplugin.PluginFactoryFunc) error
|
||||
}
|
||||
|
||||
type StaticRouteResolver interface {
|
||||
Routes() []*StaticRoute
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user