Plugins: Refactor plugin settings service (#45967)

* tests passing

* rename and rejig

* move interface to package and rename to Store

* new package

* add import alias
This commit is contained in:
Will Browne
2022-03-03 11:39:15 +01:00
committed by GitHub
parent 6dea7275a6
commit b54b438a24
12 changed files with 209 additions and 210 deletions

View File

@ -17,7 +17,6 @@ import (
"github.com/grafana/grafana/pkg/services/ngalert"
"github.com/grafana/grafana/pkg/services/notifications"
"github.com/grafana/grafana/pkg/services/plugindashboards"
"github.com/grafana/grafana/pkg/services/pluginsettings"
"github.com/grafana/grafana/pkg/services/provisioning"
"github.com/grafana/grafana/pkg/services/rendering"
secretsManager "github.com/grafana/grafana/pkg/services/secrets/manager"
@ -35,7 +34,7 @@ func ProvideBackgroundServiceRegistry(
metrics *metrics.InternalMetricsService, secretsService *secretsManager.SecretsService,
remoteCache *remotecache.RemoteCache, thumbnailsService thumbs.Service,
// Need to make sure these are initialized, is there a better place to put them?
_ *plugindashboards.Service, _ *dashboardsnapshots.Service, _ *pluginsettings.ServiceImpl,
_ *plugindashboards.Service, _ *dashboardsnapshots.Service,
_ *alerting.AlertNotificationService, _ serviceaccounts.Service,
) *BackgroundServiceRegistry {
return NewBackgroundServiceRegistry(

View File

@ -58,6 +58,7 @@ import (
"github.com/grafana/grafana/pkg/services/oauthtoken"
"github.com/grafana/grafana/pkg/services/plugindashboards"
"github.com/grafana/grafana/pkg/services/pluginsettings"
pluginSettings "github.com/grafana/grafana/pkg/services/pluginsettings/service"
"github.com/grafana/grafana/pkg/services/query"
"github.com/grafana/grafana/pkg/services/queryhistory"
"github.com/grafana/grafana/pkg/services/quota"
@ -193,8 +194,8 @@ var wireBasicSet = wire.NewSet(
dashboardsnapshots.ProvideService,
datasourceservice.ProvideService,
wire.Bind(new(datasources.DataSourceService), new(*datasourceservice.Service)),
pluginsettings.ProvideService,
wire.Bind(new(pluginsettings.Service), new(*pluginsettings.ServiceImpl)),
pluginSettings.ProvideService,
wire.Bind(new(pluginsettings.Service), new(*pluginSettings.Service)),
alerting.ProvideService,
serviceaccountsmanager.ProvideServiceAccountsService,
wire.Bind(new(serviceaccounts.Service), new(*serviceaccountsmanager.ServiceAccountsService)),