grafana/pkg/api/fakes.go
Arve Knudsen a2eda798e7
PluginManager: Make remaining plugin state non-global (#32094)
* PluginDashboards: Use plugin manager interface

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* PluginManager: Make panels non-global

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* PluginManager: Make apps non-global

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* PluginManager: Make static routes non-global

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* PluginManager: Make pluginTypes non-global

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-03-18 13:53:01 +01:00

26 lines
524 B
Go

package api
import "github.com/grafana/grafana/pkg/plugins"
type fakePluginManager struct {
plugins.Manager
staticRoutes []*plugins.PluginStaticRoute
}
func (pm *fakePluginManager) GetPlugin(id string) *plugins.PluginBase {
return nil
}
func (pm *fakePluginManager) GetDataSource(id string) *plugins.DataSourcePlugin {
return nil
}
func (pm *fakePluginManager) Renderer() *plugins.RendererPlugin {
return nil
}
func (pm *fakePluginManager) StaticRoutes() []*plugins.PluginStaticRoute {
return pm.staticRoutes
}