2021-09-01 22:38:56 +08:00
|
|
|
//go:build wireinject
|
2021-08-25 21:11:22 +08:00
|
|
|
// +build wireinject
|
|
|
|
|
2023-09-01 20:09:54 +08:00
|
|
|
// This file should contain wire sets used by both OSS and Enterprise builds.
|
|
|
|
// Use wireext_oss.go and wireext_enterprise.go for sets that are specific to
|
|
|
|
// the respective builds.
|
2021-08-25 21:11:22 +08:00
|
|
|
package server
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/google/wire"
|
2025-03-25 15:59:03 +08:00
|
|
|
"github.com/stretchr/testify/mock"
|
2025-04-07 21:47:40 +08:00
|
|
|
"go.opentelemetry.io/otel"
|
|
|
|
"go.opentelemetry.io/otel/trace"
|
2025-02-11 21:09:39 +08:00
|
|
|
|
2021-08-25 21:11:22 +08:00
|
|
|
sdkhttpclient "github.com/grafana/grafana-plugin-sdk-go/backend/httpclient"
|
2025-03-12 04:58:26 +08:00
|
|
|
|
2021-08-25 21:11:22 +08:00
|
|
|
"github.com/grafana/grafana/pkg/api"
|
2022-04-06 10:56:17 +08:00
|
|
|
"github.com/grafana/grafana/pkg/api/avatar"
|
2021-08-25 21:11:22 +08:00
|
|
|
"github.com/grafana/grafana/pkg/api/routing"
|
|
|
|
"github.com/grafana/grafana/pkg/bus"
|
2021-11-10 18:52:16 +08:00
|
|
|
"github.com/grafana/grafana/pkg/expr"
|
2022-10-19 21:02:15 +08:00
|
|
|
"github.com/grafana/grafana/pkg/infra/db"
|
2021-08-25 21:11:22 +08:00
|
|
|
"github.com/grafana/grafana/pkg/infra/httpclient"
|
|
|
|
"github.com/grafana/grafana/pkg/infra/httpclient/httpclientprovider"
|
2021-08-31 23:05:45 +08:00
|
|
|
"github.com/grafana/grafana/pkg/infra/kvstore"
|
2021-08-25 21:11:22 +08:00
|
|
|
"github.com/grafana/grafana/pkg/infra/localcache"
|
2024-05-02 15:14:12 +08:00
|
|
|
"github.com/grafana/grafana/pkg/infra/log/slogadapter"
|
2021-08-25 21:11:22 +08:00
|
|
|
"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-22 02:50:37 +08:00
|
|
|
uss "github.com/grafana/grafana/pkg/infra/usagestats/service"
|
2022-04-08 19:41:26 +08:00
|
|
|
"github.com/grafana/grafana/pkg/infra/usagestats/statscollector"
|
2023-03-24 01:19:19 +08:00
|
|
|
"github.com/grafana/grafana/pkg/infra/usagestats/validator"
|
2021-08-25 21:11:22 +08:00
|
|
|
"github.com/grafana/grafana/pkg/login/social"
|
2024-05-23 15:55:45 +08:00
|
|
|
"github.com/grafana/grafana/pkg/login/social/connectors"
|
2023-12-08 18:20:42 +08:00
|
|
|
"github.com/grafana/grafana/pkg/login/social/socialimpl"
|
2022-06-02 21:52:30 +08:00
|
|
|
"github.com/grafana/grafana/pkg/middleware/csrf"
|
2023-03-31 21:38:09 +08:00
|
|
|
"github.com/grafana/grafana/pkg/middleware/loggermw"
|
2023-09-26 06:31:58 +08:00
|
|
|
apiregistry "github.com/grafana/grafana/pkg/registry/apis"
|
2025-02-19 22:50:39 +08:00
|
|
|
"github.com/grafana/grafana/pkg/registry/apis/dashboard/legacy"
|
2025-03-25 15:59:03 +08:00
|
|
|
"github.com/grafana/grafana/pkg/registry/apis/provisioning/repository/github"
|
2025-05-20 18:48:47 +08:00
|
|
|
secretcontracts "github.com/grafana/grafana/pkg/registry/apis/secret/contracts"
|
2025-05-16 00:52:14 +08:00
|
|
|
secretdecrypt "github.com/grafana/grafana/pkg/registry/apis/secret/decrypt"
|
2025-07-03 18:29:14 +08:00
|
|
|
gsmEncryption "github.com/grafana/grafana/pkg/registry/apis/secret/encryption"
|
|
|
|
encryptionManager "github.com/grafana/grafana/pkg/registry/apis/secret/encryption/manager"
|
2024-11-01 20:28:56 +08:00
|
|
|
appregistry "github.com/grafana/grafana/pkg/registry/apps"
|
2022-05-10 21:48:47 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/accesscontrol"
|
2022-09-06 00:15:47 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/accesscontrol/acimpl"
|
2025-02-11 21:09:39 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/accesscontrol/dualwrite"
|
2022-05-10 21:48:47 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/accesscontrol/ossaccesscontrol"
|
2024-08-02 15:32:06 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/accesscontrol/permreg"
|
2024-04-19 22:38:14 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/accesscontrol/resourcepermissions"
|
2022-09-27 19:58:49 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/annotations"
|
|
|
|
"github.com/grafana/grafana/pkg/services/annotations/annotationsimpl"
|
2023-09-25 22:25:29 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/anonymous/anonimpl/anonstore"
|
2022-08-02 22:55:19 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/apikey/apikeyimpl"
|
2024-02-02 06:27:30 +08:00
|
|
|
grafanaapiserver "github.com/grafana/grafana/pkg/services/apiserver"
|
2024-02-07 00:40:35 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/apiserver/standalone"
|
2023-09-27 17:36:23 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/auth"
|
|
|
|
"github.com/grafana/grafana/pkg/services/auth/idimpl"
|
2021-08-25 21:11:22 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/auth/jwt"
|
2022-12-02 22:10:03 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/authn/authnimpl"
|
2024-06-13 17:41:35 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/authz"
|
2021-08-25 21:11:22 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/cleanup"
|
2024-02-26 21:52:16 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/cloudmigration/cloudmigrationimpl"
|
2021-08-25 21:11:22 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/contexthandler"
|
2022-07-25 22:19:07 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/correlations"
|
2022-01-28 17:28:33 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/dashboardimport"
|
|
|
|
dashboardimportservice "github.com/grafana/grafana/pkg/services/dashboardimport/service"
|
2025-01-22 04:57:43 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/dashboards"
|
2022-02-16 21:15:44 +08:00
|
|
|
dashboardstore "github.com/grafana/grafana/pkg/services/dashboards/database"
|
2022-05-18 02:52:22 +08:00
|
|
|
dashboardservice "github.com/grafana/grafana/pkg/services/dashboards/service"
|
2021-09-01 19:05:15 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/dashboardsnapshots"
|
2022-06-15 01:41:29 +08:00
|
|
|
dashsnapstore "github.com/grafana/grafana/pkg/services/dashboardsnapshots/database"
|
|
|
|
dashsnapsvc "github.com/grafana/grafana/pkg/services/dashboardsnapshots/service"
|
2022-05-25 16:41:51 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/dashboardversion/dashverimpl"
|
2021-08-25 21:11:22 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/datasourceproxy"
|
2021-10-07 22:33:50 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/datasources"
|
2022-02-11 22:52:14 +08:00
|
|
|
datasourceservice "github.com/grafana/grafana/pkg/services/datasources/service"
|
2022-08-02 21:08:09 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/encryption"
|
|
|
|
encryptionservice "github.com/grafana/grafana/pkg/services/encryption/service"
|
2023-10-06 00:13:06 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/extsvcauth"
|
|
|
|
extsvcreg "github.com/grafana/grafana/pkg/services/extsvcauth/registry"
|
2022-01-27 01:44:20 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/featuremgmt"
|
2023-03-08 00:22:30 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/folder"
|
2022-10-11 03:47:53 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/folder/folderimpl"
|
2022-09-27 04:25:34 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/grpcserver"
|
2022-10-05 04:31:02 +08:00
|
|
|
grpccontext "github.com/grafana/grafana/pkg/services/grpcserver/context"
|
|
|
|
"github.com/grafana/grafana/pkg/services/grpcserver/interceptors"
|
2021-08-25 21:11:22 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/hooks"
|
2023-02-08 16:32:59 +08:00
|
|
|
ldapapi "github.com/grafana/grafana/pkg/services/ldap/api"
|
2023-02-11 02:01:55 +08:00
|
|
|
ldapservice "github.com/grafana/grafana/pkg/services/ldap/service"
|
2021-08-25 21:11:22 +08:00
|
|
|
"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"
|
2023-11-21 21:47:23 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/login/authinfoimpl"
|
2022-11-22 18:37:18 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/loginattempt"
|
2022-09-02 00:08:42 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/loginattempt/loginattemptimpl"
|
2022-09-23 04:04:48 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/navtree/navtreeimpl"
|
2021-08-25 21:11:22 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/ngalert"
|
2022-08-09 22:28:36 +08:00
|
|
|
ngimage "github.com/grafana/grafana/pkg/services/ngalert/image"
|
2021-08-25 21:11:22 +08:00
|
|
|
ngmetrics "github.com/grafana/grafana/pkg/services/ngalert/metrics"
|
2022-08-09 22:28:36 +08:00
|
|
|
ngstore "github.com/grafana/grafana/pkg/services/ngalert/store"
|
2021-08-25 21:11:22 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/notifications"
|
|
|
|
"github.com/grafana/grafana/pkg/services/oauthtoken"
|
2022-12-02 02:08:36 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/oauthtoken/oauthtokentest"
|
2022-06-28 20:32:25 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/org/orgimpl"
|
2022-09-27 19:58:49 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/playlist/playlistimpl"
|
2022-01-28 17:28:33 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/plugindashboards"
|
2022-03-11 01:38:04 +08:00
|
|
|
plugindashboardsservice "github.com/grafana/grafana/pkg/services/plugindashboards/service"
|
2022-12-02 02:08:36 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/pluginsintegration"
|
2023-09-11 19:59:24 +08:00
|
|
|
pluginDashboards "github.com/grafana/grafana/pkg/services/pluginsintegration/dashboards"
|
2024-07-22 16:31:36 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/pluginsintegration/pluginaccesscontrol"
|
2022-04-14 20:22:00 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/preference/prefimpl"
|
2022-07-07 07:51:44 +08: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"
|
2023-04-12 01:36:50 +08:00
|
|
|
publicdashboardsmetric "github.com/grafana/grafana/pkg/services/publicdashboards/metric"
|
2022-07-07 07:51:44 +08:00
|
|
|
publicdashboardsService "github.com/grafana/grafana/pkg/services/publicdashboards/service"
|
2021-12-15 01:38:20 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/query"
|
2022-01-29 00:55:09 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/queryhistory"
|
2022-07-16 00:06:44 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/quota/quotaimpl"
|
2021-08-25 21:11:22 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/rendering"
|
|
|
|
"github.com/grafana/grafana/pkg/services/search"
|
2025-02-19 02:30:11 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/search/sort"
|
2022-02-16 02:26:03 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/searchV2"
|
2021-10-01 20:39:57 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/secrets"
|
2021-10-12 22:08:07 +08:00
|
|
|
secretsDatabase "github.com/grafana/grafana/pkg/services/secrets/database"
|
2022-04-26 00:57:45 +08:00
|
|
|
secretsStore "github.com/grafana/grafana/pkg/services/secrets/kvstore"
|
2022-07-13 04:27:37 +08:00
|
|
|
secretsMigrations "github.com/grafana/grafana/pkg/services/secrets/kvstore/migrations"
|
2021-10-12 22:08:07 +08:00
|
|
|
secretsManager "github.com/grafana/grafana/pkg/services/secrets/manager"
|
2021-11-11 23:10:24 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/serviceaccounts"
|
2023-10-24 17:01:04 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/serviceaccounts/extsvcaccounts"
|
2021-11-11 23:10:24 +08:00
|
|
|
serviceaccountsmanager "github.com/grafana/grafana/pkg/services/serviceaccounts/manager"
|
2023-11-03 17:27:43 +08:00
|
|
|
serviceaccountsproxy "github.com/grafana/grafana/pkg/services/serviceaccounts/proxy"
|
2022-12-13 21:56:10 +08:00
|
|
|
serviceaccountsretriever "github.com/grafana/grafana/pkg/services/serviceaccounts/retriever"
|
2021-08-25 21:11:22 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/shorturls"
|
2023-01-12 17:13:47 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/shorturls/shorturlimpl"
|
2023-04-17 17:42:37 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/signingkeys"
|
|
|
|
"github.com/grafana/grafana/pkg/services/signingkeys/signingkeysimpl"
|
2021-08-25 21:11:22 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/sqlstore"
|
2024-02-09 22:35:39 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/sqlstore/sqlutil"
|
2023-11-08 17:50:01 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/ssosettings"
|
|
|
|
ssoSettingsImpl "github.com/grafana/grafana/pkg/services/ssosettings/ssosettingsimpl"
|
2023-01-25 22:58:54 +08:00
|
|
|
starApi "github.com/grafana/grafana/pkg/services/star/api"
|
2022-05-16 22:42:02 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/star/starimpl"
|
2022-12-01 01:11:07 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/stats/statsimpl"
|
2022-03-18 01:19:23 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/store"
|
2022-10-19 22:33:26 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/store/resolver"
|
2022-09-27 19:58:49 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/store/sanitizer"
|
2023-01-05 00:33:18 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/supportbundles"
|
2023-02-07 00:50:03 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/supportbundles/bundleregistry"
|
2023-01-05 00:33:18 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/supportbundles/supportbundlesimpl"
|
2022-09-21 20:04:01 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/tag"
|
|
|
|
"github.com/grafana/grafana/pkg/services/tag/tagimpl"
|
2023-10-12 16:10:54 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/team/teamapi"
|
2022-09-20 18:14:00 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/team/teamimpl"
|
2022-09-20 17:29:17 +08:00
|
|
|
tempuser "github.com/grafana/grafana/pkg/services/temp_user"
|
2022-08-13 00:13:23 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/temp_user/tempuserimpl"
|
2025-05-09 21:58:04 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/updatemanager"
|
2024-03-14 20:25:28 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/user"
|
2022-06-28 20:32:25 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/user/userimpl"
|
2021-08-25 21:11:22 +08:00
|
|
|
"github.com/grafana/grafana/pkg/setting"
|
2025-02-19 22:50:39 +08:00
|
|
|
legacydualwrite "github.com/grafana/grafana/pkg/storage/legacysql/dualwrite"
|
2025-05-20 18:48:47 +08:00
|
|
|
secretdatabase "github.com/grafana/grafana/pkg/storage/secret/database"
|
2025-06-12 18:52:01 +08:00
|
|
|
secretencryption "github.com/grafana/grafana/pkg/storage/secret/encryption"
|
2025-03-19 20:41:29 +08:00
|
|
|
secretmetadata "github.com/grafana/grafana/pkg/storage/secret/metadata"
|
2025-05-21 22:02:51 +08:00
|
|
|
secretmigrator "github.com/grafana/grafana/pkg/storage/secret/migrator"
|
2025-02-19 22:50:39 +08:00
|
|
|
"github.com/grafana/grafana/pkg/storage/unified/resource"
|
2024-11-21 13:53:25 +08:00
|
|
|
unifiedsearch "github.com/grafana/grafana/pkg/storage/unified/search"
|
2021-08-25 21:11:22 +08:00
|
|
|
"github.com/grafana/grafana/pkg/tsdb/azuremonitor"
|
2023-07-06 20:45:47 +08:00
|
|
|
cloudmonitoring "github.com/grafana/grafana/pkg/tsdb/cloud-monitoring"
|
2021-08-25 21:11:22 +08:00
|
|
|
"github.com/grafana/grafana/pkg/tsdb/cloudwatch"
|
|
|
|
"github.com/grafana/grafana/pkg/tsdb/elasticsearch"
|
2023-11-13 15:49:26 +08:00
|
|
|
postgres "github.com/grafana/grafana/pkg/tsdb/grafana-postgresql-datasource"
|
2023-06-07 11:09:29 +08:00
|
|
|
pyroscope "github.com/grafana/grafana/pkg/tsdb/grafana-pyroscope-datasource"
|
2023-09-22 20:00:40 +08:00
|
|
|
testdatasource "github.com/grafana/grafana/pkg/tsdb/grafana-testdata-datasource"
|
2021-09-10 22:44:47 +08:00
|
|
|
"github.com/grafana/grafana/pkg/tsdb/grafanads"
|
2021-08-25 21:11:22 +08:00
|
|
|
"github.com/grafana/grafana/pkg/tsdb/graphite"
|
|
|
|
"github.com/grafana/grafana/pkg/tsdb/influxdb"
|
2025-01-24 20:37:36 +08:00
|
|
|
"github.com/grafana/grafana/pkg/tsdb/jaeger"
|
2021-08-25 21:11:22 +08:00
|
|
|
"github.com/grafana/grafana/pkg/tsdb/loki"
|
2021-09-07 15:35:37 +08:00
|
|
|
"github.com/grafana/grafana/pkg/tsdb/mssql"
|
|
|
|
"github.com/grafana/grafana/pkg/tsdb/mysql"
|
2021-08-25 21:11:22 +08:00
|
|
|
"github.com/grafana/grafana/pkg/tsdb/opentsdb"
|
2022-10-28 19:33:37 +08:00
|
|
|
"github.com/grafana/grafana/pkg/tsdb/parca"
|
2021-08-25 21:11:22 +08:00
|
|
|
"github.com/grafana/grafana/pkg/tsdb/prometheus"
|
|
|
|
"github.com/grafana/grafana/pkg/tsdb/tempo"
|
2024-11-07 23:48:00 +08:00
|
|
|
"github.com/grafana/grafana/pkg/tsdb/zipkin"
|
2021-08-25 21:11:22 +08:00
|
|
|
)
|
|
|
|
|
2025-04-07 21:47:40 +08:00
|
|
|
func otelTracer() trace.Tracer {
|
|
|
|
return otel.GetTracerProvider().Tracer("grafana")
|
|
|
|
}
|
|
|
|
|
|
|
|
var withOTelSet = wire.NewSet(
|
|
|
|
otelTracer,
|
|
|
|
grpcserver.ProvideService,
|
|
|
|
interceptors.ProvideAuthenticator,
|
|
|
|
)
|
|
|
|
|
2021-08-25 21:11:22 +08:00
|
|
|
var wireBasicSet = wire.NewSet(
|
2022-09-19 15:54:37 +08:00
|
|
|
annotationsimpl.ProvideService,
|
|
|
|
wire.Bind(new(annotations.Repository), new(*annotationsimpl.RepositoryImpl)),
|
2021-08-25 21:11:22 +08:00
|
|
|
New,
|
|
|
|
api.ProvideHTTPServer,
|
2021-12-15 01:38:20 +08:00
|
|
|
query.ProvideService,
|
2023-03-17 02:39:17 +08:00
|
|
|
wire.Bind(new(query.Service), new(*query.ServiceImpl)),
|
2021-08-25 21:11:22 +08:00
|
|
|
bus.ProvideBus,
|
|
|
|
wire.Bind(new(bus.Bus), new(*bus.InProcBus)),
|
|
|
|
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 23:05:45 +08:00
|
|
|
kvstore.ProvideService,
|
2021-08-25 21:11:22 +08:00
|
|
|
localcache.ProvideService,
|
2023-02-07 00:50:03 +08:00
|
|
|
bundleregistry.ProvideService,
|
|
|
|
wire.Bind(new(supportbundles.Service), new(*bundleregistry.Service)),
|
2025-05-09 21:58:04 +08:00
|
|
|
updatemanager.ProvideGrafanaService,
|
|
|
|
updatemanager.ProvidePluginsService,
|
2021-09-22 02:50:37 +08:00
|
|
|
uss.ProvideService,
|
|
|
|
wire.Bind(new(usagestats.Service), new(*uss.UsageStats)),
|
2023-03-24 01:19:19 +08:00
|
|
|
validator.ProvideService,
|
2025-02-19 22:50:39 +08:00
|
|
|
legacy.ProvideLegacyMigrator,
|
2022-12-02 02:08:36 +08:00
|
|
|
pluginsintegration.WireSet,
|
2022-08-30 23:30:43 +08:00
|
|
|
pluginDashboards.ProvideFileStoreManager,
|
|
|
|
wire.Bind(new(pluginDashboards.FileStore), new(*pluginDashboards.FileStoreManager)),
|
2021-08-25 21:11:22 +08:00
|
|
|
cloudwatch.ProvideService,
|
|
|
|
cloudmonitoring.ProvideService,
|
|
|
|
azuremonitor.ProvideService,
|
|
|
|
postgres.ProvideService,
|
2021-09-07 15:35:37 +08:00
|
|
|
mysql.ProvideService,
|
|
|
|
mssql.ProvideService,
|
2022-04-27 16:29:39 +08:00
|
|
|
store.ProvideEntityEventsService,
|
2025-02-19 22:50:39 +08:00
|
|
|
legacydualwrite.ProvideService,
|
2021-08-25 21:11:22 +08:00
|
|
|
httpclientprovider.New,
|
|
|
|
wire.Bind(new(httpclient.Provider), new(*sdkhttpclient.Provider)),
|
|
|
|
serverlock.ProvideService,
|
2022-09-22 20:27:48 +08:00
|
|
|
annotationsimpl.ProvideCleanupService,
|
|
|
|
wire.Bind(new(annotations.Cleaner), new(*annotationsimpl.CleanupServiceImpl)),
|
2021-08-25 21:11:22 +08:00
|
|
|
cleanup.ProvideService,
|
2023-01-12 17:13:47 +08:00
|
|
|
shorturlimpl.ProvideService,
|
|
|
|
wire.Bind(new(shorturls.Service), new(*shorturlimpl.ShortURLService)),
|
2022-01-29 00:55:09 +08:00
|
|
|
queryhistory.ProvideService,
|
|
|
|
wire.Bind(new(queryhistory.Service), new(*queryhistory.QueryHistoryService)),
|
2022-07-25 22:19:07 +08:00
|
|
|
correlations.ProvideService,
|
|
|
|
wire.Bind(new(correlations.Service), new(*correlations.CorrelationsService)),
|
2022-07-16 00:06:44 +08:00
|
|
|
quotaimpl.ProvideService,
|
2021-08-25 21:11:22 +08:00
|
|
|
remotecache.ProvideService,
|
2023-02-21 23:21:18 +08:00
|
|
|
wire.Bind(new(remotecache.CacheStorage), new(*remotecache.RemoteCache)),
|
2023-11-21 21:47:23 +08:00
|
|
|
authinfoimpl.ProvideService,
|
|
|
|
wire.Bind(new(login.AuthInfoService), new(*authinfoimpl.Service)),
|
|
|
|
authinfoimpl.ProvideStore,
|
2021-08-25 21:11:22 +08:00
|
|
|
datasourceproxy.ProvideService,
|
2025-02-19 02:30:11 +08:00
|
|
|
sort.ProvideService,
|
2021-08-25 21:11:22 +08:00
|
|
|
search.ProvideService,
|
2022-02-16 02:26:03 +08:00
|
|
|
searchV2.ProvideService,
|
2022-09-23 07:02:09 +08:00
|
|
|
searchV2.ProvideSearchHTTPService,
|
2022-03-18 01:19:23 +08:00
|
|
|
store.ProvideService,
|
2022-11-24 22:15:32 +08:00
|
|
|
store.ProvideSystemUsersService,
|
2021-08-25 21:11:22 +08:00
|
|
|
live.ProvideService,
|
|
|
|
pushhttp.ProvideService,
|
|
|
|
contexthandler.ProvideService,
|
2023-02-11 02:01:55 +08:00
|
|
|
ldapservice.ProvideService,
|
|
|
|
wire.Bind(new(ldapservice.LDAP), new(*ldapservice.LDAPImpl)),
|
2021-08-25 21:11:22 +08:00
|
|
|
jwt.ProvideService,
|
2023-01-21 02:11:06 +08:00
|
|
|
wire.Bind(new(jwt.JWTService), new(*jwt.AuthService)),
|
2022-08-09 22:28:36 +08:00
|
|
|
ngstore.ProvideDBStore,
|
|
|
|
ngimage.ProvideDeleteExpiredService,
|
2021-08-25 21:11:22 +08:00
|
|
|
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-14 05:19:15 +08:00
|
|
|
notifications.ProvideSmtpService,
|
2025-03-25 15:59:03 +08:00
|
|
|
github.ProvideFactory,
|
2021-08-25 21:11:22 +08:00
|
|
|
tracing.ProvideService,
|
2024-03-22 00:06:32 +08:00
|
|
|
tracing.ProvideTracingConfig,
|
2023-10-03 20:54:20 +08:00
|
|
|
wire.Bind(new(tracing.Tracer), new(*tracing.TracingService)),
|
2025-04-07 21:47:40 +08:00
|
|
|
withOTelSet,
|
2021-08-25 21:11:22 +08:00
|
|
|
testdatasource.ProvideService,
|
2023-02-08 16:32:59 +08:00
|
|
|
ldapapi.ProvideService,
|
2021-08-25 21:11:22 +08:00
|
|
|
opentsdb.ProvideService,
|
2023-12-08 18:20:42 +08:00
|
|
|
socialimpl.ProvideService,
|
2021-08-25 21:11:22 +08:00
|
|
|
influxdb.ProvideService,
|
2023-12-08 18:20:42 +08:00
|
|
|
wire.Bind(new(social.Service), new(*socialimpl.SocialService)),
|
2021-08-25 21:11:22 +08:00
|
|
|
tempo.ProvideService,
|
|
|
|
loki.ProvideService,
|
|
|
|
graphite.ProvideService,
|
|
|
|
prometheus.ProvideService,
|
|
|
|
elasticsearch.ProvideService,
|
2023-06-07 11:09:29 +08:00
|
|
|
pyroscope.ProvideService,
|
2022-10-28 19:33:37 +08:00
|
|
|
parca.ProvideService,
|
2024-11-07 23:48:00 +08:00
|
|
|
zipkin.ProvideService,
|
2025-01-24 20:37:36 +08:00
|
|
|
jaeger.ProvideService,
|
2023-08-21 21:26:49 +08:00
|
|
|
datasourceservice.ProvideCacheService,
|
|
|
|
wire.Bind(new(datasources.CacheService), new(*datasourceservice.CacheServiceImpl)),
|
2022-08-02 21:08:09 +08:00
|
|
|
encryptionservice.ProvideEncryptionService,
|
|
|
|
wire.Bind(new(encryption.Internal), new(*encryptionservice.Service)),
|
2021-10-12 22:08:07 +08:00
|
|
|
secretsManager.ProvideSecretsService,
|
|
|
|
wire.Bind(new(secrets.Service), new(*secretsManager.SecretsService)),
|
|
|
|
secretsDatabase.ProvideSecretsStore,
|
|
|
|
wire.Bind(new(secrets.Store), new(*secretsDatabase.SecretsStoreImpl)),
|
2021-09-10 22:44:47 +08:00
|
|
|
grafanads.ProvideService,
|
2022-06-15 01:41:29 +08:00
|
|
|
wire.Bind(new(dashboardsnapshots.Store), new(*dashsnapstore.DashboardSnapshotStore)),
|
|
|
|
dashsnapstore.ProvideStore,
|
|
|
|
wire.Bind(new(dashboardsnapshots.Service), new(*dashsnapsvc.ServiceImpl)),
|
|
|
|
dashsnapsvc.ProvideService,
|
2022-02-11 22:52:14 +08:00
|
|
|
datasourceservice.ProvideService,
|
|
|
|
wire.Bind(new(datasources.DataSourceService), new(*datasourceservice.Service)),
|
2024-03-09 00:12:59 +08:00
|
|
|
datasourceservice.ProvideLegacyDataSourceLookup,
|
2022-12-13 21:56:10 +08:00
|
|
|
serviceaccountsretriever.ProvideService,
|
2024-10-29 17:21:39 +08:00
|
|
|
wire.Bind(new(serviceaccounts.ServiceAccountRetriever), new(*serviceaccountsretriever.Service)),
|
2022-07-08 17:53:18 +08:00
|
|
|
ossaccesscontrol.ProvideServiceAccountPermissions,
|
|
|
|
wire.Bind(new(accesscontrol.ServiceAccountPermissionsService), new(*ossaccesscontrol.ServiceAccountPermissionsService)),
|
2021-11-11 23:10:24 +08:00
|
|
|
serviceaccountsmanager.ProvideServiceAccountsService,
|
2023-11-03 17:27:43 +08:00
|
|
|
serviceaccountsproxy.ProvideServiceAccountsProxy,
|
|
|
|
wire.Bind(new(serviceaccounts.Service), new(*serviceaccountsproxy.ServiceAccountsProxy)),
|
2021-11-10 18:52:16 +08:00
|
|
|
expr.ProvideService,
|
2022-01-27 01:44:20 +08:00
|
|
|
featuremgmt.ProvideManagerService,
|
|
|
|
featuremgmt.ProvideToggles,
|
2025-03-06 22:09:26 +08:00
|
|
|
featuremgmt.ProvideOpenFeatureService,
|
2025-06-28 00:30:38 +08:00
|
|
|
featuremgmt.ProvideStaticEvaluator,
|
2023-03-09 03:37:45 +08:00
|
|
|
dashboardservice.ProvideDashboardServiceImpl,
|
2025-01-22 04:57:43 +08:00
|
|
|
wire.Bind(new(dashboards.PermissionsRegistrationService), new(*dashboardservice.DashboardServiceImpl)),
|
2023-03-09 03:37:45 +08:00
|
|
|
dashboardservice.ProvideDashboardService,
|
|
|
|
dashboardservice.ProvideDashboardProvisioningService,
|
|
|
|
dashboardservice.ProvideDashboardPluginService,
|
2022-02-16 21:15:44 +08:00
|
|
|
dashboardstore.ProvideDashboardStore,
|
2022-10-11 03:47:53 +08:00
|
|
|
folderimpl.ProvideService,
|
2025-01-07 16:53:09 +08:00
|
|
|
wire.Bind(new(folder.Service), new(*folderimpl.Service)),
|
2024-09-30 16:28:47 +08:00
|
|
|
folderimpl.ProvideStore,
|
|
|
|
wire.Bind(new(folder.Store), new(*folderimpl.FolderStoreImpl)),
|
2023-02-01 21:43:21 +08:00
|
|
|
folderimpl.ProvideDashboardFolderStore,
|
|
|
|
wire.Bind(new(folder.FolderStore), new(*folderimpl.DashboardFolderStoreImpl)),
|
2022-01-28 17:28:33 +08:00
|
|
|
dashboardimportservice.ProvideService,
|
|
|
|
wire.Bind(new(dashboardimport.Service), new(*dashboardimportservice.ImportDashboardService)),
|
2022-03-11 01:38:04 +08:00
|
|
|
plugindashboardsservice.ProvideService,
|
|
|
|
wire.Bind(new(plugindashboards.Service), new(*plugindashboardsservice.Service)),
|
|
|
|
plugindashboardsservice.ProvideDashboardUpdater,
|
2022-07-07 19:32:18 +08:00
|
|
|
sanitizer.ProvideService,
|
2022-04-26 00:57:45 +08:00
|
|
|
secretsStore.ProvideService,
|
2022-04-06 10:56:17 +08:00
|
|
|
avatar.ProvideAvatarCacheServer,
|
2022-04-08 19:41:26 +08:00
|
|
|
statscollector.ProvideService,
|
2022-06-02 21:52:30 +08:00
|
|
|
csrf.ProvideCSRFFilter,
|
2023-04-24 21:11:08 +08:00
|
|
|
wire.Bind(new(csrf.Service), new(*csrf.CSRF)),
|
2022-05-10 21:48:47 +08: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)),
|
2024-09-21 06:31:42 +08:00
|
|
|
ossaccesscontrol.ProvideReceiverPermissionsService,
|
|
|
|
wire.Bind(new(accesscontrol.ReceiverPermissionsService), new(*ossaccesscontrol.ReceiverPermissionsService)),
|
2022-05-16 22:42:02 +08:00
|
|
|
starimpl.ProvideService,
|
2022-07-18 17:26:35 +08:00
|
|
|
playlistimpl.ProvideService,
|
2022-08-02 22:55:19 +08:00
|
|
|
apikeyimpl.ProvideService,
|
2022-05-25 16:41:51 +08:00
|
|
|
dashverimpl.ProvideService,
|
2022-07-07 07:51:44 +08:00
|
|
|
publicdashboardsService.ProvideService,
|
|
|
|
wire.Bind(new(publicdashboards.Service), new(*publicdashboardsService.PublicDashboardServiceImpl)),
|
|
|
|
publicdashboardsStore.ProvideStore,
|
|
|
|
wire.Bind(new(publicdashboards.Store), new(*publicdashboardsStore.PublicDashboardStoreImpl)),
|
2023-04-12 01:36:50 +08:00
|
|
|
publicdashboardsmetric.ProvideService,
|
2022-07-07 07:51:44 +08:00
|
|
|
publicdashboardsApi.ProvideApi,
|
2023-01-25 22:58:54 +08:00
|
|
|
starApi.ProvideApi,
|
2022-06-28 20:32:25 +08:00
|
|
|
userimpl.ProvideService,
|
|
|
|
orgimpl.ProvideService,
|
2025-01-07 01:05:22 +08:00
|
|
|
orgimpl.ProvideDeletionService,
|
2022-12-01 01:11:07 +08:00
|
|
|
statsimpl.ProvideService,
|
2022-10-05 04:31:02 +08:00
|
|
|
grpccontext.ProvideContextHandler,
|
2022-09-27 04:25:34 +08:00
|
|
|
grpcserver.ProvideHealthService,
|
2022-09-29 02:00:46 +08:00
|
|
|
grpcserver.ProvideReflectionService,
|
2022-12-01 05:42:42 +08:00
|
|
|
resolver.ProvideEntityReferenceResolver,
|
2022-09-20 18:14:00 +08:00
|
|
|
teamimpl.ProvideService,
|
2023-10-12 16:10:54 +08:00
|
|
|
teamapi.ProvideTeamAPI,
|
2022-08-13 00:13:23 +08:00
|
|
|
tempuserimpl.ProvideService,
|
2022-08-17 14:34:23 +08:00
|
|
|
loginattemptimpl.ProvideService,
|
2022-11-22 18:37:18 +08:00
|
|
|
wire.Bind(new(loginattempt.Service), new(*loginattemptimpl.Service)),
|
2022-08-26 05:04:44 +08:00
|
|
|
secretsMigrations.ProvideDataSourceMigrationService,
|
2022-09-07 03:21:25 +08:00
|
|
|
secretsMigrations.ProvideSecretMigrationProvider,
|
|
|
|
wire.Bind(new(secretsMigrations.SecretMigrationProvider), new(*secretsMigrations.SecretMigrationProviderImpl)),
|
2024-05-21 22:09:26 +08:00
|
|
|
resourcepermissions.NewActionSetService,
|
2024-05-23 19:14:01 +08:00
|
|
|
wire.Bind(new(accesscontrol.ActionResolver), new(resourcepermissions.ActionSetService)),
|
2024-07-22 16:31:36 +08:00
|
|
|
wire.Bind(new(pluginaccesscontrol.ActionSetRegistry), new(resourcepermissions.ActionSetService)),
|
2024-08-02 15:32:06 +08:00
|
|
|
permreg.ProvidePermissionRegistry,
|
2022-09-06 00:15:47 +08:00
|
|
|
acimpl.ProvideAccessControl,
|
2025-02-11 21:09:39 +08:00
|
|
|
dualwrite.ProvideZanzanaReconciler,
|
2022-09-23 04:04:48 +08:00
|
|
|
navtreeimpl.ProvideService,
|
2022-09-06 00:15:47 +08:00
|
|
|
wire.Bind(new(accesscontrol.AccessControl), new(*acimpl.AccessControl)),
|
2022-09-20 17:29:17 +08:00
|
|
|
wire.Bind(new(notifications.TempUserStore), new(tempuser.Service)),
|
2022-09-21 20:04:01 +08:00
|
|
|
tagimpl.ProvideService,
|
|
|
|
wire.Bind(new(tag.Service), new(*tagimpl.Service)),
|
2022-12-02 22:10:03 +08:00
|
|
|
authnimpl.ProvideService,
|
2023-09-06 19:10:07 +08:00
|
|
|
authnimpl.ProvideIdentitySynchronizer,
|
|
|
|
authnimpl.ProvideAuthnService,
|
2024-07-09 03:22:10 +08:00
|
|
|
authnimpl.ProvideAuthnServiceAuthenticateOnly,
|
2024-04-04 15:33:00 +08:00
|
|
|
authnimpl.ProvideRegistration,
|
2022-12-20 18:13:37 +08:00
|
|
|
supportbundlesimpl.ProvideService,
|
2023-10-10 15:20:52 +08:00
|
|
|
extsvcaccounts.ProvideExtSvcAccountsService,
|
2023-10-24 17:01:04 +08:00
|
|
|
wire.Bind(new(serviceaccounts.ExtSvcAccountsService), new(*extsvcaccounts.ExtSvcAccountsService)),
|
2023-10-06 00:13:06 +08:00
|
|
|
extsvcreg.ProvideExtSvcRegistry,
|
|
|
|
wire.Bind(new(extsvcauth.ExternalServiceRegistry), new(*extsvcreg.Registry)),
|
2023-09-25 22:25:29 +08:00
|
|
|
anonstore.ProvideAnonDBStore,
|
|
|
|
wire.Bind(new(anonstore.AnonStore), new(*anonstore.AnonDBStore)),
|
2023-03-31 21:38:09 +08:00
|
|
|
loggermw.Provide,
|
2024-05-02 15:14:12 +08:00
|
|
|
slogadapter.Provide,
|
2023-04-17 17:42:37 +08:00
|
|
|
signingkeysimpl.ProvideEmbeddedSigningKeysService,
|
|
|
|
wire.Bind(new(signingkeys.Service), new(*signingkeysimpl.Service)),
|
2023-11-08 17:50:01 +08:00
|
|
|
ssoSettingsImpl.ProvideService,
|
2024-01-24 22:39:50 +08:00
|
|
|
wire.Bind(new(ssosettings.Service), new(*ssoSettingsImpl.Service)),
|
2023-09-27 17:36:23 +08:00
|
|
|
idimpl.ProvideService,
|
|
|
|
wire.Bind(new(auth.IDService), new(*idimpl.Service)),
|
2024-02-26 21:52:16 +08:00
|
|
|
cloudmigrationimpl.ProvideService,
|
2024-03-14 20:25:28 +08:00
|
|
|
userimpl.ProvideVerifier,
|
2024-05-23 15:55:45 +08:00
|
|
|
connectors.ProvideOrgRoleMapper,
|
2024-03-14 20:25:28 +08:00
|
|
|
wire.Bind(new(user.Verifier), new(*userimpl.Verifier)),
|
2024-06-13 17:41:35 +08:00
|
|
|
authz.WireSet,
|
2025-03-19 20:41:29 +08:00
|
|
|
// Secrets Manager
|
|
|
|
secretmetadata.ProvideSecureValueMetadataStorage,
|
|
|
|
secretmetadata.ProvideKeeperMetadataStorage,
|
2025-06-12 20:31:48 +08:00
|
|
|
secretmetadata.ProvideOutboxQueue,
|
2025-07-01 00:17:07 +08:00
|
|
|
secretencryption.ProvideDataKeyStorage,
|
2025-06-12 18:52:01 +08:00
|
|
|
secretencryption.ProvideEncryptedValueStorage,
|
2025-05-21 22:02:51 +08:00
|
|
|
secretmigrator.NewWithEngine,
|
2025-05-20 18:48:47 +08:00
|
|
|
secretdatabase.ProvideDatabase,
|
|
|
|
wire.Bind(new(secretcontracts.Database), new(*secretdatabase.Database)),
|
2025-07-03 18:29:14 +08:00
|
|
|
encryptionManager.ProvideEncryptionManager,
|
|
|
|
gsmEncryption.ProvideThirdPartyProviderMap,
|
2025-05-16 00:52:14 +08:00
|
|
|
secretdecrypt.ProvideDecryptAuthorizer,
|
|
|
|
secretdecrypt.ProvideDecryptAllowList,
|
2025-02-28 20:39:39 +08:00
|
|
|
// Unified storage
|
|
|
|
resource.ProvideStorageMetrics,
|
2025-03-13 22:09:38 +08:00
|
|
|
resource.ProvideIndexMetrics,
|
2024-01-23 00:09:08 +08:00
|
|
|
// Kubernetes API server
|
2023-09-26 06:31:58 +08:00
|
|
|
grafanaapiserver.WireSet,
|
|
|
|
apiregistry.WireSet,
|
2024-11-01 20:28:56 +08:00
|
|
|
appregistry.WireSet,
|
2021-08-25 21:11:22 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
var wireSet = wire.NewSet(
|
|
|
|
wireBasicSet,
|
2023-12-07 05:34:23 +08:00
|
|
|
metrics.WireSet,
|
2021-08-25 21:11:22 +08:00
|
|
|
sqlstore.ProvideService,
|
|
|
|
ngmetrics.ProvideService,
|
2022-01-26 23:42:40 +08: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-03-22 22:43:53 +08:00
|
|
|
wire.Bind(new(db.DB), new(*sqlstore.SQLStore)),
|
2022-04-21 21:03:17 +08:00
|
|
|
prefimpl.ProvideService,
|
2022-12-02 02:08:36 +08:00
|
|
|
oauthtoken.ProvideService,
|
|
|
|
wire.Bind(new(oauthtoken.OAuthTokenService), new(*oauthtoken.Service)),
|
2025-03-12 04:58:26 +08:00
|
|
|
wire.Bind(new(cleanup.AlertRuleService), new(*ngstore.DBstore)),
|
2021-08-25 21:11:22 +08:00
|
|
|
)
|
|
|
|
|
2023-03-17 23:36:39 +08:00
|
|
|
var wireCLISet = wire.NewSet(
|
|
|
|
NewRunner,
|
|
|
|
wireBasicSet,
|
2023-12-07 05:34:23 +08:00
|
|
|
metrics.WireSet,
|
2023-03-17 23:36:39 +08:00
|
|
|
sqlstore.ProvideService,
|
|
|
|
ngmetrics.ProvideService,
|
|
|
|
wire.Bind(new(notifications.Service), new(*notifications.NotificationService)),
|
|
|
|
wire.Bind(new(notifications.WebhookSender), new(*notifications.NotificationService)),
|
|
|
|
wire.Bind(new(notifications.EmailSender), new(*notifications.NotificationService)),
|
|
|
|
wire.Bind(new(db.DB), new(*sqlstore.SQLStore)),
|
|
|
|
prefimpl.ProvideService,
|
|
|
|
oauthtoken.ProvideService,
|
|
|
|
wire.Bind(new(oauthtoken.OAuthTokenService), new(*oauthtoken.Service)),
|
|
|
|
)
|
|
|
|
|
2021-08-25 21:11:22 +08:00
|
|
|
var wireTestSet = wire.NewSet(
|
|
|
|
wireBasicSet,
|
|
|
|
ProvideTestEnv,
|
2023-12-07 05:34:23 +08:00
|
|
|
metrics.WireSetForTest,
|
2021-08-25 21:11:22 +08:00
|
|
|
sqlstore.ProvideServiceForTests,
|
|
|
|
ngmetrics.ProvideServiceForTest,
|
2022-01-26 23:42:40 +08:00
|
|
|
notifications.MockNotificationService,
|
|
|
|
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-04-21 21:03:17 +08:00
|
|
|
wire.Bind(new(db.DB), new(*sqlstore.SQLStore)),
|
|
|
|
prefimpl.ProvideService,
|
2022-12-02 02:08:36 +08:00
|
|
|
oauthtoken.ProvideService,
|
|
|
|
oauthtokentest.ProvideService,
|
|
|
|
wire.Bind(new(oauthtoken.OAuthTokenService), new(*oauthtokentest.Service)),
|
2025-03-12 04:58:26 +08:00
|
|
|
wire.Bind(new(cleanup.AlertRuleService), new(*ngstore.DBstore)),
|
2021-08-25 21:11:22 +08:00
|
|
|
)
|
|
|
|
|
2023-09-01 20:09:54 +08:00
|
|
|
func Initialize(cfg *setting.Cfg, opts Options, apiOpts api.ServerOptions) (*Server, error) {
|
2021-08-25 21:11:22 +08:00
|
|
|
wire.Build(wireExtsSet)
|
|
|
|
return &Server{}, nil
|
|
|
|
}
|
|
|
|
|
2025-03-25 15:59:03 +08:00
|
|
|
func InitializeForTest(t sqlutil.ITestDB, testingT interface {
|
|
|
|
mock.TestingT
|
|
|
|
Cleanup(func())
|
|
|
|
}, cfg *setting.Cfg, opts Options, apiOpts api.ServerOptions) (*TestEnv, error) {
|
2021-08-25 21:11:22 +08:00
|
|
|
wire.Build(wireExtsTestSet)
|
2025-03-25 15:59:03 +08:00
|
|
|
return &TestEnv{Server: &Server{}, TestingT: testingT, SQLStore: &sqlstore.SQLStore{}, Cfg: &setting.Cfg{}}, nil
|
2021-08-25 21:11:22 +08:00
|
|
|
}
|
2023-03-17 23:36:39 +08:00
|
|
|
|
2023-09-01 20:09:54 +08:00
|
|
|
func InitializeForCLI(cfg *setting.Cfg) (Runner, error) {
|
2023-03-17 23:36:39 +08:00
|
|
|
wire.Build(wireExtsCLISet)
|
|
|
|
return Runner{}, nil
|
|
|
|
}
|
2023-09-01 20:09:54 +08:00
|
|
|
|
|
|
|
// InitializeForCLITarget is a simplified set of dependencies for the CLI, used
|
|
|
|
// by the server target subcommand to launch specific dskit modules.
|
|
|
|
func InitializeForCLITarget(cfg *setting.Cfg) (ModuleRunner, error) {
|
|
|
|
wire.Build(wireExtsBaseCLISet)
|
|
|
|
return ModuleRunner{}, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// InitializeModuleServer is a simplified set of dependencies for the CLI,
|
|
|
|
// suitable for running background services and targeting dskit modules.
|
|
|
|
func InitializeModuleServer(cfg *setting.Cfg, opts Options, apiOpts api.ServerOptions) (*ModuleServer, error) {
|
|
|
|
wire.Build(wireExtsModuleServerSet)
|
|
|
|
return &ModuleServer{}, nil
|
|
|
|
}
|
2024-01-22 22:21:27 +08:00
|
|
|
|
2024-02-07 00:40:35 +08:00
|
|
|
// Initialize the standalone APIServer factory
|
|
|
|
func InitializeAPIServerFactory() (standalone.APIServerFactory, error) {
|
|
|
|
wire.Build(wireExtsStandaloneAPIServerSet)
|
2024-09-27 14:04:35 +08:00
|
|
|
return &standalone.NoOpAPIServerFactory{}, nil // Wire will replace this with a real interface
|
2024-01-22 22:21:27 +08:00
|
|
|
}
|
2024-12-19 01:00:54 +08:00
|
|
|
|
|
|
|
func InitializeDocumentBuilders(cfg *setting.Cfg) (resource.DocumentBuilderSupplier, error) {
|
|
|
|
wire.Build(wireExtsSet)
|
|
|
|
return &unifiedsearch.StandardDocumentBuilders{}, nil
|
|
|
|
}
|