2021-09-01 09:38:56 -05:00
|
|
|
//go:build wireinject && oss
|
2021-08-25 08:11:22 -05:00
|
|
|
// +build wireinject,oss
|
|
|
|
|
|
|
|
package server
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/google/wire"
|
2022-08-11 07:45:29 -05:00
|
|
|
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/models"
|
2021-11-01 04:53:33 -05:00
|
|
|
"github.com/grafana/grafana/pkg/plugins"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/registry"
|
|
|
|
"github.com/grafana/grafana/pkg/server/backgroundsvcs"
|
2022-04-28 04:06:49 -05:00
|
|
|
"github.com/grafana/grafana/pkg/server/usagestatssvcs"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/accesscontrol"
|
2022-09-05 11:15:47 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/accesscontrol/acimpl"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/accesscontrol/ossaccesscontrol"
|
|
|
|
"github.com/grafana/grafana/pkg/services/auth"
|
2022-11-18 02:56:06 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/auth/authimpl"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/datasources"
|
2022-02-28 02:54:56 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/datasources/permissions"
|
2022-02-11 08:52:14 -06:00
|
|
|
datasourceservice "github.com/grafana/grafana/pkg/services/datasources/service"
|
2021-08-30 12:39:55 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/encryption"
|
2022-08-02 08:08:09 -05:00
|
|
|
encryptionprovider "github.com/grafana/grafana/pkg/services/encryption/provider"
|
2021-11-17 03:52:45 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/kmsproviders"
|
|
|
|
"github.com/grafana/grafana/pkg/services/kmsproviders/osskmsproviders"
|
2022-02-01 05:03:21 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/ldap"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/licensing"
|
|
|
|
"github.com/grafana/grafana/pkg/services/login"
|
|
|
|
"github.com/grafana/grafana/pkg/services/login/authinfoservice"
|
2022-12-01 12:08:36 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/pluginsintegration"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/provisioning"
|
2021-09-29 05:51:49 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/searchusers"
|
2021-10-07 09:06:16 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/searchusers/filters"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/sqlstore/migrations"
|
2022-04-12 12:34:04 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/thumbs"
|
2022-08-11 07:45:29 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/user"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/validations"
|
|
|
|
"github.com/grafana/grafana/pkg/setting"
|
|
|
|
)
|
|
|
|
|
|
|
|
var wireExtsBasicSet = wire.NewSet(
|
2022-11-18 02:56:06 -06:00
|
|
|
authimpl.ProvideUserAuthTokenService,
|
|
|
|
wire.Bind(new(auth.UserTokenService), new(*authimpl.UserAuthTokenService)),
|
|
|
|
wire.Bind(new(auth.UserTokenBackgroundService), new(*authimpl.UserAuthTokenService)),
|
2021-08-25 08:11:22 -05:00
|
|
|
licensing.ProvideService,
|
|
|
|
wire.Bind(new(models.Licensing), new(*licensing.OSSLicensingService)),
|
|
|
|
setting.ProvideProvider,
|
|
|
|
wire.Bind(new(setting.Provider), new(*setting.OSSImpl)),
|
2022-09-05 11:15:47 -05:00
|
|
|
acimpl.ProvideService,
|
|
|
|
wire.Bind(new(accesscontrol.RoleRegistry), new(*acimpl.Service)),
|
2022-11-07 04:30:45 -06:00
|
|
|
wire.Bind(new(plugins.RoleRegistry), new(*acimpl.Service)),
|
2022-09-05 11:15:47 -05:00
|
|
|
wire.Bind(new(accesscontrol.Service), new(*acimpl.Service)),
|
2022-04-12 12:34:04 -05:00
|
|
|
thumbs.ProvideCrawlerAuthSetupService,
|
|
|
|
wire.Bind(new(thumbs.CrawlerAuthSetupService), new(*thumbs.OSSCrawlerAuthSetupService)),
|
2021-08-25 08:11:22 -05:00
|
|
|
validations.ProvideValidator,
|
|
|
|
wire.Bind(new(models.PluginRequestValidator), new(*validations.OSSPluginRequestValidator)),
|
|
|
|
provisioning.ProvideService,
|
|
|
|
wire.Bind(new(provisioning.ProvisioningService), new(*provisioning.ProvisioningServiceImpl)),
|
|
|
|
backgroundsvcs.ProvideBackgroundServiceRegistry,
|
|
|
|
wire.Bind(new(registry.BackgroundServiceRegistry), new(*backgroundsvcs.BackgroundServiceRegistry)),
|
2022-02-11 08:52:14 -06:00
|
|
|
datasourceservice.ProvideCacheService,
|
|
|
|
wire.Bind(new(datasources.CacheService), new(*datasourceservice.CacheServiceImpl)),
|
2021-08-25 08:11:22 -05:00
|
|
|
migrations.ProvideOSSMigrations,
|
|
|
|
wire.Bind(new(registry.DatabaseMigrator), new(*migrations.OSSMigrations)),
|
|
|
|
authinfoservice.ProvideOSSUserProtectionService,
|
|
|
|
wire.Bind(new(login.UserProtectionService), new(*authinfoservice.OSSUserProtectionImpl)),
|
2022-08-02 08:08:09 -05:00
|
|
|
encryptionprovider.ProvideEncryptionProvider,
|
|
|
|
wire.Bind(new(encryption.Provider), new(encryptionprovider.Provider)),
|
2021-10-07 09:06:16 -05:00
|
|
|
filters.ProvideOSSSearchUserFilter,
|
2022-08-11 07:45:29 -05:00
|
|
|
wire.Bind(new(user.SearchUserFilter), new(*filters.OSSSearchUserFilter)),
|
2021-09-29 05:51:49 -05:00
|
|
|
searchusers.ProvideUsersService,
|
|
|
|
wire.Bind(new(searchusers.Service), new(*searchusers.OSSService)),
|
2021-11-17 03:52:45 -06:00
|
|
|
osskmsproviders.ProvideService,
|
|
|
|
wire.Bind(new(kmsproviders.Service), new(osskmsproviders.Service)),
|
2022-02-01 05:03:21 -06:00
|
|
|
ldap.ProvideGroupsService,
|
|
|
|
wire.Bind(new(ldap.Groups), new(*ldap.OSSGroups)),
|
2022-02-28 02:54:56 -06:00
|
|
|
permissions.ProvideDatasourcePermissionsService,
|
|
|
|
wire.Bind(new(permissions.DatasourcePermissionsService), new(*permissions.OSSDatasourcePermissionsService)),
|
2022-04-28 04:06:49 -05:00
|
|
|
usagestatssvcs.ProvideUsageStatsProvidersRegistry,
|
|
|
|
wire.Bind(new(registry.UsageStatsProvidersRegistry), new(*usagestatssvcs.UsageStatsProvidersRegistry)),
|
2022-05-10 08:48:47 -05:00
|
|
|
ossaccesscontrol.ProvideDatasourcePermissionsService,
|
|
|
|
wire.Bind(new(accesscontrol.DatasourcePermissionsService), new(*ossaccesscontrol.DatasourcePermissionsService)),
|
2022-12-01 12:08:36 -06:00
|
|
|
pluginsintegration.WireExtensionSet,
|
2021-08-25 08:11:22 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
var wireExtsSet = wire.NewSet(
|
|
|
|
wireSet,
|
|
|
|
wireExtsBasicSet,
|
|
|
|
)
|
|
|
|
|
|
|
|
var wireExtsTestSet = wire.NewSet(
|
|
|
|
wireTestSet,
|
|
|
|
wireExtsBasicSet,
|
|
|
|
)
|