2021-09-01 09:38:56 -05:00
|
|
|
//go:build wireinject
|
2021-08-25 08:11:22 -05:00
|
|
|
// +build wireinject
|
|
|
|
|
|
|
|
package server
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/google/wire"
|
|
|
|
sdkhttpclient "github.com/grafana/grafana-plugin-sdk-go/backend/httpclient"
|
2022-07-07 06:32:18 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/store/sanitizer"
|
2022-06-14 12:41:29 -05:00
|
|
|
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/api"
|
2022-04-05 21:56:17 -05:00
|
|
|
"github.com/grafana/grafana/pkg/api/avatar"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/api/routing"
|
|
|
|
"github.com/grafana/grafana/pkg/bus"
|
2022-04-14 13:54:35 -05:00
|
|
|
"github.com/grafana/grafana/pkg/cuectx"
|
2021-11-10 04:52:16 -06:00
|
|
|
"github.com/grafana/grafana/pkg/expr"
|
2022-06-15 08:47:04 -05:00
|
|
|
cmreg "github.com/grafana/grafana/pkg/framework/coremodel/registry"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/infra/httpclient"
|
|
|
|
"github.com/grafana/grafana/pkg/infra/httpclient/httpclientprovider"
|
2021-08-31 10:05:45 -05:00
|
|
|
"github.com/grafana/grafana/pkg/infra/kvstore"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/infra/localcache"
|
|
|
|
"github.com/grafana/grafana/pkg/infra/metrics"
|
|
|
|
"github.com/grafana/grafana/pkg/infra/remotecache"
|
|
|
|
"github.com/grafana/grafana/pkg/infra/serverlock"
|
|
|
|
"github.com/grafana/grafana/pkg/infra/tracing"
|
|
|
|
"github.com/grafana/grafana/pkg/infra/usagestats"
|
2021-09-21 13:50:37 -05:00
|
|
|
uss "github.com/grafana/grafana/pkg/infra/usagestats/service"
|
2022-04-08 06:41:26 -05:00
|
|
|
"github.com/grafana/grafana/pkg/infra/usagestats/statscollector"
|
2022-04-04 13:36:15 -05:00
|
|
|
loginpkg "github.com/grafana/grafana/pkg/login"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/login/social"
|
2022-06-02 08:52:30 -05:00
|
|
|
"github.com/grafana/grafana/pkg/middleware/csrf"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/models"
|
|
|
|
"github.com/grafana/grafana/pkg/plugins"
|
2022-01-20 11:16:22 -06:00
|
|
|
"github.com/grafana/grafana/pkg/plugins/backendplugin/coreplugin"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/plugins/manager"
|
2021-11-01 04:53:33 -05:00
|
|
|
"github.com/grafana/grafana/pkg/plugins/manager/loader"
|
2022-06-03 06:06:27 -05:00
|
|
|
"github.com/grafana/grafana/pkg/plugins/manager/registry"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/plugins/plugincontext"
|
2022-05-10 08:48:47 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/accesscontrol"
|
|
|
|
"github.com/grafana/grafana/pkg/services/accesscontrol/ossaccesscontrol"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/alerting"
|
|
|
|
"github.com/grafana/grafana/pkg/services/auth/jwt"
|
|
|
|
"github.com/grafana/grafana/pkg/services/cleanup"
|
2022-02-22 01:47:42 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/comments"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/contexthandler"
|
2022-03-30 10:01:24 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/contexthandler/authproxy"
|
2022-01-28 03:28:33 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/dashboardimport"
|
|
|
|
dashboardimportservice "github.com/grafana/grafana/pkg/services/dashboardimport/service"
|
2022-02-16 07:15:44 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/dashboards"
|
|
|
|
dashboardstore "github.com/grafana/grafana/pkg/services/dashboards/database"
|
2022-05-17 13:52:22 -05:00
|
|
|
dashboardservice "github.com/grafana/grafana/pkg/services/dashboards/service"
|
2021-09-01 06:05:15 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/dashboardsnapshots"
|
2022-06-14 12:41:29 -05:00
|
|
|
dashsnapstore "github.com/grafana/grafana/pkg/services/dashboardsnapshots/database"
|
|
|
|
dashsnapsvc "github.com/grafana/grafana/pkg/services/dashboardsnapshots/service"
|
2022-05-25 03:41:51 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/dashboardversion/dashverimpl"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/datasourceproxy"
|
2021-10-07 09:33:50 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/datasources"
|
2022-02-11 08:52:14 -06:00
|
|
|
datasourceservice "github.com/grafana/grafana/pkg/services/datasources/service"
|
2022-04-25 18:59:18 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/export"
|
2022-01-26 11:44:20 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/featuremgmt"
|
2022-03-03 08:05:47 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/guardian"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/hooks"
|
|
|
|
"github.com/grafana/grafana/pkg/services/libraryelements"
|
|
|
|
"github.com/grafana/grafana/pkg/services/librarypanels"
|
|
|
|
"github.com/grafana/grafana/pkg/services/live"
|
|
|
|
"github.com/grafana/grafana/pkg/services/live/pushhttp"
|
|
|
|
"github.com/grafana/grafana/pkg/services/login"
|
|
|
|
"github.com/grafana/grafana/pkg/services/login/authinfoservice"
|
2022-02-03 11:23:45 -06:00
|
|
|
authinfodatabase "github.com/grafana/grafana/pkg/services/login/authinfoservice/database"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/login/loginservice"
|
|
|
|
"github.com/grafana/grafana/pkg/services/ngalert"
|
|
|
|
ngmetrics "github.com/grafana/grafana/pkg/services/ngalert/metrics"
|
|
|
|
"github.com/grafana/grafana/pkg/services/notifications"
|
|
|
|
"github.com/grafana/grafana/pkg/services/oauthtoken"
|
2022-06-28 07:32:25 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/org/orgimpl"
|
2022-01-28 03:28:33 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/plugindashboards"
|
2022-03-10 11:38:04 -06:00
|
|
|
plugindashboardsservice "github.com/grafana/grafana/pkg/services/plugindashboards/service"
|
2021-10-07 09:33:50 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/pluginsettings"
|
2022-03-03 04:39:15 -06:00
|
|
|
pluginSettings "github.com/grafana/grafana/pkg/services/pluginsettings/service"
|
2022-04-14 07:22:00 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/preference/prefimpl"
|
2022-07-06 18:51:44 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/publicdashboards"
|
|
|
|
publicdashboardsApi "github.com/grafana/grafana/pkg/services/publicdashboards/api"
|
|
|
|
publicdashboardsStore "github.com/grafana/grafana/pkg/services/publicdashboards/database"
|
|
|
|
publicdashboardsService "github.com/grafana/grafana/pkg/services/publicdashboards/service"
|
2021-12-14 11:38:20 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/query"
|
2022-01-28 10:55:09 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/queryhistory"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/quota"
|
|
|
|
"github.com/grafana/grafana/pkg/services/rendering"
|
|
|
|
"github.com/grafana/grafana/pkg/services/search"
|
2022-02-15 12:26:03 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/searchV2"
|
2021-10-01 07:39:57 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/secrets"
|
2021-10-12 09:08:07 -05:00
|
|
|
secretsDatabase "github.com/grafana/grafana/pkg/services/secrets/database"
|
2022-04-25 11:57:45 -05:00
|
|
|
secretsStore "github.com/grafana/grafana/pkg/services/secrets/kvstore"
|
2021-10-12 09:08:07 -05:00
|
|
|
secretsManager "github.com/grafana/grafana/pkg/services/secrets/manager"
|
2022-07-04 05:17:21 -05:00
|
|
|
secretsMigrator "github.com/grafana/grafana/pkg/services/secrets/migrator"
|
2021-11-11 09:10:24 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/serviceaccounts"
|
|
|
|
serviceaccountsmanager "github.com/grafana/grafana/pkg/services/serviceaccounts/manager"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/shorturls"
|
|
|
|
"github.com/grafana/grafana/pkg/services/sqlstore"
|
2022-03-22 09:43:53 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/sqlstore/db"
|
2022-02-03 02:20:20 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/sqlstore/mockstore"
|
2022-05-16 09:42:02 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/star/starimpl"
|
2022-03-17 12:19:23 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/store"
|
2022-01-07 06:38:00 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/teamguardian"
|
|
|
|
teamguardianDatabase "github.com/grafana/grafana/pkg/services/teamguardian/database"
|
|
|
|
teamguardianManager "github.com/grafana/grafana/pkg/services/teamguardian/manager"
|
2021-12-23 11:43:53 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/thumbs"
|
2021-11-01 04:53:33 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/updatechecker"
|
2022-06-28 07:32:25 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/user/userimpl"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/setting"
|
|
|
|
"github.com/grafana/grafana/pkg/tsdb/azuremonitor"
|
|
|
|
"github.com/grafana/grafana/pkg/tsdb/cloudmonitoring"
|
|
|
|
"github.com/grafana/grafana/pkg/tsdb/cloudwatch"
|
|
|
|
"github.com/grafana/grafana/pkg/tsdb/elasticsearch"
|
2021-09-10 09:44:47 -05:00
|
|
|
"github.com/grafana/grafana/pkg/tsdb/grafanads"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/tsdb/graphite"
|
|
|
|
"github.com/grafana/grafana/pkg/tsdb/influxdb"
|
2021-11-10 04:52:16 -06:00
|
|
|
"github.com/grafana/grafana/pkg/tsdb/legacydata"
|
|
|
|
legacydataservice "github.com/grafana/grafana/pkg/tsdb/legacydata/service"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/tsdb/loki"
|
2021-09-07 02:35:37 -05:00
|
|
|
"github.com/grafana/grafana/pkg/tsdb/mssql"
|
|
|
|
"github.com/grafana/grafana/pkg/tsdb/mysql"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/tsdb/opentsdb"
|
|
|
|
"github.com/grafana/grafana/pkg/tsdb/postgres"
|
|
|
|
"github.com/grafana/grafana/pkg/tsdb/prometheus"
|
|
|
|
"github.com/grafana/grafana/pkg/tsdb/tempo"
|
|
|
|
"github.com/grafana/grafana/pkg/tsdb/testdatasource"
|
|
|
|
)
|
|
|
|
|
|
|
|
var wireBasicSet = wire.NewSet(
|
2021-11-10 04:52:16 -06:00
|
|
|
legacydataservice.ProvideService,
|
|
|
|
wire.Bind(new(legacydata.RequestHandler), new(*legacydataservice.Service)),
|
2021-08-25 08:11:22 -05:00
|
|
|
alerting.ProvideAlertEngine,
|
|
|
|
wire.Bind(new(alerting.UsageStatsQuerier), new(*alerting.AlertEngine)),
|
|
|
|
setting.NewCfgFromArgs,
|
|
|
|
New,
|
|
|
|
api.ProvideHTTPServer,
|
2021-12-14 11:38:20 -06:00
|
|
|
query.ProvideService,
|
2021-08-25 08:11:22 -05:00
|
|
|
bus.ProvideBus,
|
|
|
|
wire.Bind(new(bus.Bus), new(*bus.InProcBus)),
|
2021-12-23 11:43:53 -06:00
|
|
|
thumbs.ProvideService,
|
2021-08-25 08:11:22 -05:00
|
|
|
rendering.ProvideService,
|
|
|
|
wire.Bind(new(rendering.Service), new(*rendering.RenderingService)),
|
|
|
|
routing.ProvideRegister,
|
|
|
|
wire.Bind(new(routing.RouteRegister), new(*routing.RouteRegisterImpl)),
|
|
|
|
hooks.ProvideService,
|
2021-08-31 10:05:45 -05:00
|
|
|
kvstore.ProvideService,
|
2021-08-25 08:11:22 -05:00
|
|
|
localcache.ProvideService,
|
2022-01-31 09:06:16 -06:00
|
|
|
updatechecker.ProvideGrafanaService,
|
|
|
|
updatechecker.ProvidePluginsService,
|
2021-09-21 13:50:37 -05:00
|
|
|
uss.ProvideService,
|
|
|
|
wire.Bind(new(usagestats.Service), new(*uss.UsageStats)),
|
2022-06-03 06:06:27 -05:00
|
|
|
registry.ProvideService,
|
|
|
|
wire.Bind(new(registry.Service), new(*registry.InMemory)),
|
2021-08-25 08:11:22 -05:00
|
|
|
manager.ProvideService,
|
2022-06-07 10:51:00 -05:00
|
|
|
wire.Bind(new(plugins.Manager), new(*manager.PluginManager)),
|
2021-11-01 04:53:33 -05:00
|
|
|
wire.Bind(new(plugins.Client), new(*manager.PluginManager)),
|
|
|
|
wire.Bind(new(plugins.Store), new(*manager.PluginManager)),
|
2022-03-10 11:38:04 -06:00
|
|
|
wire.Bind(new(plugins.DashboardFileStore), new(*manager.PluginManager)),
|
2021-11-01 04:53:33 -05:00
|
|
|
wire.Bind(new(plugins.StaticRouteResolver), new(*manager.PluginManager)),
|
|
|
|
wire.Bind(new(plugins.RendererManager), new(*manager.PluginManager)),
|
2022-06-09 12:19:27 -05:00
|
|
|
wire.Bind(new(plugins.SecretsPluginManager), new(*manager.PluginManager)),
|
2022-01-20 11:16:22 -06:00
|
|
|
coreplugin.ProvideCoreRegistry,
|
2021-11-01 04:53:33 -05:00
|
|
|
loader.ProvideService,
|
2022-06-03 06:06:27 -05:00
|
|
|
wire.Bind(new(loader.Service), new(*loader.Loader)),
|
2021-11-01 04:53:33 -05:00
|
|
|
wire.Bind(new(plugins.ErrorResolver), new(*loader.Loader)),
|
2021-08-25 08:11:22 -05:00
|
|
|
cloudwatch.ProvideService,
|
|
|
|
cloudmonitoring.ProvideService,
|
|
|
|
azuremonitor.ProvideService,
|
|
|
|
postgres.ProvideService,
|
2021-09-07 02:35:37 -05:00
|
|
|
mysql.ProvideService,
|
|
|
|
mssql.ProvideService,
|
2022-04-27 03:29:39 -05:00
|
|
|
store.ProvideEntityEventsService,
|
2021-08-25 08:11:22 -05:00
|
|
|
httpclientprovider.New,
|
|
|
|
wire.Bind(new(httpclient.Provider), new(*sdkhttpclient.Provider)),
|
|
|
|
serverlock.ProvideService,
|
|
|
|
cleanup.ProvideService,
|
|
|
|
shorturls.ProvideService,
|
|
|
|
wire.Bind(new(shorturls.Service), new(*shorturls.ShortURLService)),
|
2022-01-28 10:55:09 -06:00
|
|
|
queryhistory.ProvideService,
|
|
|
|
wire.Bind(new(queryhistory.Service), new(*queryhistory.QueryHistoryService)),
|
2021-08-25 08:11:22 -05:00
|
|
|
quota.ProvideService,
|
|
|
|
remotecache.ProvideService,
|
|
|
|
loginservice.ProvideService,
|
|
|
|
wire.Bind(new(login.Service), new(*loginservice.Implementation)),
|
|
|
|
authinfoservice.ProvideAuthInfoService,
|
|
|
|
wire.Bind(new(login.AuthInfoService), new(*authinfoservice.Implementation)),
|
2022-02-03 11:23:45 -06:00
|
|
|
authinfodatabase.ProvideAuthInfoStore,
|
|
|
|
wire.Bind(new(login.Store), new(*authinfodatabase.AuthInfoStore)),
|
2022-04-04 13:36:15 -05:00
|
|
|
loginpkg.ProvideService,
|
|
|
|
wire.Bind(new(loginpkg.Authenticator), new(*loginpkg.AuthenticatorService)),
|
2021-08-25 08:11:22 -05:00
|
|
|
datasourceproxy.ProvideService,
|
|
|
|
search.ProvideService,
|
2022-02-15 12:26:03 -06:00
|
|
|
searchV2.ProvideService,
|
2022-03-17 12:19:23 -05:00
|
|
|
store.ProvideService,
|
|
|
|
store.ProvideHTTPService,
|
2022-04-25 18:59:18 -05:00
|
|
|
export.ProvideService,
|
2021-08-25 08:11:22 -05:00
|
|
|
live.ProvideService,
|
|
|
|
pushhttp.ProvideService,
|
|
|
|
plugincontext.ProvideService,
|
|
|
|
contexthandler.ProvideService,
|
|
|
|
jwt.ProvideService,
|
|
|
|
wire.Bind(new(models.JWTService), new(*jwt.AuthService)),
|
|
|
|
ngalert.ProvideService,
|
|
|
|
librarypanels.ProvideService,
|
|
|
|
wire.Bind(new(librarypanels.Service), new(*librarypanels.LibraryPanelService)),
|
|
|
|
libraryelements.ProvideService,
|
|
|
|
wire.Bind(new(libraryelements.Service), new(*libraryelements.LibraryElementService)),
|
|
|
|
notifications.ProvideService,
|
2022-01-13 15:19:15 -06:00
|
|
|
notifications.ProvideSmtpService,
|
2021-08-25 08:11:22 -05:00
|
|
|
tracing.ProvideService,
|
|
|
|
metrics.ProvideService,
|
|
|
|
testdatasource.ProvideService,
|
|
|
|
opentsdb.ProvideService,
|
|
|
|
social.ProvideService,
|
|
|
|
influxdb.ProvideService,
|
|
|
|
wire.Bind(new(social.Service), new(*social.SocialService)),
|
|
|
|
oauthtoken.ProvideService,
|
|
|
|
wire.Bind(new(oauthtoken.OAuthTokenService), new(*oauthtoken.Service)),
|
|
|
|
tempo.ProvideService,
|
|
|
|
loki.ProvideService,
|
|
|
|
graphite.ProvideService,
|
|
|
|
prometheus.ProvideService,
|
|
|
|
elasticsearch.ProvideService,
|
2021-10-12 09:08:07 -05:00
|
|
|
secretsManager.ProvideSecretsService,
|
|
|
|
wire.Bind(new(secrets.Service), new(*secretsManager.SecretsService)),
|
|
|
|
secretsDatabase.ProvideSecretsStore,
|
|
|
|
wire.Bind(new(secrets.Store), new(*secretsDatabase.SecretsStoreImpl)),
|
2022-07-04 05:17:21 -05:00
|
|
|
secretsMigrator.ProvideSecretsMigrator,
|
|
|
|
wire.Bind(new(secrets.Migrator), new(*secretsMigrator.SecretsMigrator)),
|
2021-09-10 09:44:47 -05:00
|
|
|
grafanads.ProvideService,
|
2022-06-14 12:41:29 -05:00
|
|
|
wire.Bind(new(dashboardsnapshots.Store), new(*dashsnapstore.DashboardSnapshotStore)),
|
|
|
|
dashsnapstore.ProvideStore,
|
|
|
|
wire.Bind(new(dashboardsnapshots.Service), new(*dashsnapsvc.ServiceImpl)),
|
|
|
|
dashsnapsvc.ProvideService,
|
2022-02-11 08:52:14 -06:00
|
|
|
datasourceservice.ProvideService,
|
|
|
|
wire.Bind(new(datasources.DataSourceService), new(*datasourceservice.Service)),
|
2022-03-03 04:39:15 -06:00
|
|
|
pluginSettings.ProvideService,
|
|
|
|
wire.Bind(new(pluginsettings.Service), new(*pluginSettings.Service)),
|
2021-10-07 09:33:50 -05:00
|
|
|
alerting.ProvideService,
|
2021-11-11 09:10:24 -06:00
|
|
|
serviceaccountsmanager.ProvideServiceAccountsService,
|
|
|
|
wire.Bind(new(serviceaccounts.Service), new(*serviceaccountsmanager.ServiceAccountsService)),
|
2021-11-10 04:52:16 -06:00
|
|
|
expr.ProvideService,
|
2022-01-07 06:38:00 -06:00
|
|
|
teamguardianDatabase.ProvideTeamGuardianStore,
|
|
|
|
wire.Bind(new(teamguardian.Store), new(*teamguardianDatabase.TeamGuardianStoreImpl)),
|
|
|
|
teamguardianManager.ProvideService,
|
|
|
|
wire.Bind(new(teamguardian.TeamGuardian), new(*teamguardianManager.Service)),
|
2022-01-26 11:44:20 -06:00
|
|
|
featuremgmt.ProvideManagerService,
|
|
|
|
featuremgmt.ProvideToggles,
|
2022-02-16 07:15:44 -06:00
|
|
|
dashboardservice.ProvideDashboardService,
|
|
|
|
dashboardservice.ProvideFolderService,
|
|
|
|
dashboardstore.ProvideDashboardStore,
|
|
|
|
wire.Bind(new(dashboards.DashboardService), new(*dashboardservice.DashboardServiceImpl)),
|
|
|
|
wire.Bind(new(dashboards.DashboardProvisioningService), new(*dashboardservice.DashboardServiceImpl)),
|
2022-03-10 11:38:04 -06:00
|
|
|
wire.Bind(new(dashboards.PluginService), new(*dashboardservice.DashboardServiceImpl)),
|
2022-02-16 07:15:44 -06:00
|
|
|
wire.Bind(new(dashboards.FolderService), new(*dashboardservice.FolderServiceImpl)),
|
|
|
|
wire.Bind(new(dashboards.Store), new(*dashboardstore.DashboardStore)),
|
2022-01-28 03:28:33 -06:00
|
|
|
dashboardimportservice.ProvideService,
|
|
|
|
wire.Bind(new(dashboardimport.Service), new(*dashboardimportservice.ImportDashboardService)),
|
2022-03-10 11:38:04 -06:00
|
|
|
plugindashboardsservice.ProvideService,
|
|
|
|
wire.Bind(new(plugindashboards.Service), new(*plugindashboardsservice.Service)),
|
|
|
|
plugindashboardsservice.ProvideDashboardUpdater,
|
2022-02-28 02:54:56 -06:00
|
|
|
alerting.ProvideDashAlertExtractorService,
|
|
|
|
wire.Bind(new(alerting.DashAlertExtractor), new(*alerting.DashAlertExtractorService)),
|
2022-02-22 01:47:42 -06:00
|
|
|
comments.ProvideService,
|
2022-03-03 08:05:47 -06:00
|
|
|
guardian.ProvideService,
|
2022-07-07 06:32:18 -05:00
|
|
|
sanitizer.ProvideService,
|
2022-04-25 11:57:45 -05:00
|
|
|
secretsStore.ProvideService,
|
2022-04-05 21:56:17 -05:00
|
|
|
avatar.ProvideAvatarCacheServer,
|
2022-03-30 10:01:24 -05:00
|
|
|
authproxy.ProvideAuthProxy,
|
2022-04-08 06:41:26 -05:00
|
|
|
statscollector.ProvideService,
|
2022-06-15 08:47:04 -05:00
|
|
|
cmreg.CoremodelSet,
|
2022-04-14 13:54:35 -05:00
|
|
|
cuectx.ProvideCUEContext,
|
|
|
|
cuectx.ProvideThemaLibrary,
|
2022-06-02 08:52:30 -05:00
|
|
|
csrf.ProvideCSRFFilter,
|
2022-05-10 08:48:47 -05:00
|
|
|
ossaccesscontrol.ProvideTeamPermissions,
|
|
|
|
wire.Bind(new(accesscontrol.TeamPermissionsService), new(*ossaccesscontrol.TeamPermissionsService)),
|
|
|
|
ossaccesscontrol.ProvideFolderPermissions,
|
|
|
|
wire.Bind(new(accesscontrol.FolderPermissionsService), new(*ossaccesscontrol.FolderPermissionsService)),
|
|
|
|
ossaccesscontrol.ProvideDashboardPermissions,
|
|
|
|
wire.Bind(new(accesscontrol.DashboardPermissionsService), new(*ossaccesscontrol.DashboardPermissionsService)),
|
2022-05-16 09:42:02 -05:00
|
|
|
starimpl.ProvideService,
|
2022-05-25 03:41:51 -05:00
|
|
|
dashverimpl.ProvideService,
|
2022-07-06 18:51:44 -05:00
|
|
|
publicdashboardsService.ProvideService,
|
|
|
|
wire.Bind(new(publicdashboards.Service), new(*publicdashboardsService.PublicDashboardServiceImpl)),
|
|
|
|
publicdashboardsStore.ProvideStore,
|
|
|
|
wire.Bind(new(publicdashboards.Store), new(*publicdashboardsStore.PublicDashboardStoreImpl)),
|
|
|
|
publicdashboardsApi.ProvideApi,
|
2022-06-28 07:32:25 -05:00
|
|
|
userimpl.ProvideService,
|
|
|
|
orgimpl.ProvideService,
|
2021-08-25 08:11:22 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
var wireSet = wire.NewSet(
|
|
|
|
wireBasicSet,
|
|
|
|
sqlstore.ProvideService,
|
2022-02-03 06:26:05 -06:00
|
|
|
wire.Bind(new(alerting.AlertStore), new(*sqlstore.SQLStore)),
|
2022-04-21 07:14:45 -05:00
|
|
|
wire.Bind(new(sqlstore.TeamStore), new(*sqlstore.SQLStore)),
|
2021-08-25 08:11:22 -05:00
|
|
|
ngmetrics.ProvideService,
|
2022-03-22 03:04:30 -05:00
|
|
|
wire.Bind(new(notifications.TempUserStore), new(*sqlstore.SQLStore)),
|
2022-01-26 09:42:40 -06:00
|
|
|
wire.Bind(new(notifications.Service), new(*notifications.NotificationService)),
|
|
|
|
wire.Bind(new(notifications.WebhookSender), new(*notifications.NotificationService)),
|
|
|
|
wire.Bind(new(notifications.EmailSender), new(*notifications.NotificationService)),
|
2022-02-03 02:20:20 -06:00
|
|
|
wire.Bind(new(sqlstore.Store), new(*sqlstore.SQLStore)),
|
2022-03-22 09:43:53 -05:00
|
|
|
wire.Bind(new(db.DB), new(*sqlstore.SQLStore)),
|
2022-04-21 08:03:17 -05:00
|
|
|
prefimpl.ProvideService,
|
2021-08-25 08:11:22 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
var wireTestSet = wire.NewSet(
|
|
|
|
wireBasicSet,
|
|
|
|
ProvideTestEnv,
|
|
|
|
sqlstore.ProvideServiceForTests,
|
|
|
|
ngmetrics.ProvideServiceForTest,
|
2022-02-03 06:26:05 -06:00
|
|
|
wire.Bind(new(alerting.AlertStore), new(*sqlstore.SQLStore)),
|
2022-04-21 07:14:45 -05:00
|
|
|
wire.Bind(new(sqlstore.TeamStore), new(*sqlstore.SQLStore)),
|
2022-01-26 09:42:40 -06:00
|
|
|
|
|
|
|
notifications.MockNotificationService,
|
2022-03-22 03:04:30 -05:00
|
|
|
wire.Bind(new(notifications.TempUserStore), new(*mockstore.SQLStoreMock)),
|
2022-01-26 09:42:40 -06:00
|
|
|
wire.Bind(new(notifications.Service), new(*notifications.NotificationServiceMock)),
|
|
|
|
wire.Bind(new(notifications.WebhookSender), new(*notifications.NotificationServiceMock)),
|
|
|
|
wire.Bind(new(notifications.EmailSender), new(*notifications.NotificationServiceMock)),
|
2022-02-03 02:20:20 -06:00
|
|
|
mockstore.NewSQLStoreMock,
|
2022-04-06 09:31:26 -05:00
|
|
|
wire.Bind(new(sqlstore.Store), new(*sqlstore.SQLStore)),
|
2022-04-21 08:03:17 -05:00
|
|
|
wire.Bind(new(db.DB), new(*sqlstore.SQLStore)),
|
|
|
|
prefimpl.ProvideService,
|
2021-08-25 08:11:22 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
func Initialize(cla setting.CommandLineArgs, opts Options, apiOpts api.ServerOptions) (*Server, error) {
|
|
|
|
wire.Build(wireExtsSet)
|
|
|
|
return &Server{}, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func InitializeForTest(cla setting.CommandLineArgs, opts Options, apiOpts api.ServerOptions) (*TestEnv, error) {
|
|
|
|
wire.Build(wireExtsTestSet)
|
|
|
|
return &TestEnv{Server: &Server{}, SQLStore: &sqlstore.SQLStore{}}, nil
|
|
|
|
}
|