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"
|
2024-03-21 20:39:39 +08:00
|
|
|
|
2021-08-25 21:11:22 +08:00
|
|
|
sdkhttpclient "github.com/grafana/grafana-plugin-sdk-go/backend/httpclient"
|
2024-03-21 20:39:39 +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"
|
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"
|
2022-05-10 21:48:47 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/accesscontrol/ossaccesscontrol"
|
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"
|
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"
|
2022-03-03 22:05:47 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/guardian"
|
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"
|
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"
|
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"
|
2024-04-08 23:42:12 +08:00
|
|
|
entityStore "github.com/grafana/grafana/pkg/services/store/entity"
|
Storage: Unified Storage based on Entity API (#71977)
* first round of entityapi updates
- quote column names and clean up insert/update queries
- replace grn with guid
- streamline table structure
fixes
streamline entity history
move EntitySummary into proto
remove EntitySummary
add guid to json
fix tests
change DB_Uuid to DB_NVarchar
fix folder test
convert interface to any
more cleanup
start entity store under grafana-apiserver dskit target
CRUD working, kind of
rough cut of wiring entity api to kube-apiserver
fake grafana user in context
add key to entity
list working
revert unnecessary changes
move entity storage files to their own package, clean up
use accessor to read/write grafana annotations
implement separate Create and Update functions
* go mod tidy
* switch from Kind to resource
* basic grpc storage server
* basic support for grpc entity store
* don't connect to database unless it's needed, pass user identity over grpc
* support getting user from k8s context, fix some mysql issues
* assign owner to snowflake dependency
* switch from ulid to uuid for guids
* cleanup, rename Search to List
* remove entityListResult
* EntityAPI: remove extra user abstraction (#79033)
* remove extra user abstraction
* add test stub (but
* move grpc context setup into client wrapper, fix lint issue
* remove unused constants
* remove custom json stuff
* basic list filtering, add todo
* change target to storage-server, allow entityStore flag in prod mode
* fix issue with Update
* EntityAPI: make test work, need to resolve expected differences (#79123)
* make test work, need to resolve expected differences
* remove the fields not supported by legacy
* sanitize out the bits legacy does not support
* sanitize out the bits legacy does not support
---------
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* update feature toggle generated files
* remove unused http headers
* update feature flag strategy
* devmode
* update readme
* spelling
* readme
---------
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-12-07 04:21:21 +08:00
|
|
|
entityDB "github.com/grafana/grafana/pkg/services/store/entity/db"
|
2024-01-30 21:15:12 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/store/entity/db/dbimpl"
|
2022-12-01 05:42:42 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/store/entity/sqlstash"
|
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"
|
2021-11-01 17:53:33 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/updatechecker"
|
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"
|
|
|
|
"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"
|
|
|
|
"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"
|
|
|
|
)
|
|
|
|
|
|
|
|
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)),
|
2022-01-31 23:06:16 +08:00
|
|
|
updatechecker.ProvideGrafanaService,
|
|
|
|
updatechecker.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,
|
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,
|
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,
|
|
|
|
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,
|
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)),
|
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,
|
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,
|
|
|
|
wire.Bind(new(serviceaccountsretriever.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,
|
2023-03-09 03:37:45 +08:00
|
|
|
dashboardservice.ProvideDashboardServiceImpl,
|
|
|
|
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,
|
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-03-03 22:05:47 +08:00
|
|
|
guardian.ProvideService,
|
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)),
|
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,
|
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.ProvideService,
|
|
|
|
grpcserver.ProvideHealthService,
|
2022-09-29 02:00:46 +08:00
|
|
|
grpcserver.ProvideReflectionService,
|
2022-10-05 04:31:02 +08:00
|
|
|
interceptors.ProvideAuthenticator,
|
2024-01-30 21:15:12 +08:00
|
|
|
dbimpl.ProvideEntityDB,
|
|
|
|
wire.Bind(new(entityDB.EntityDBInterface), new(*dbimpl.EntityDB)),
|
2022-12-01 05:42:42 +08:00
|
|
|
sqlstash.ProvideSQLEntityServer,
|
2024-04-08 23:42:12 +08:00
|
|
|
wire.Bind(new(entityStore.EntityStoreServer), new(sqlstash.SqlEntityServer)),
|
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,
|
|
|
|
secretsMigrations.ProvideMigrateToPluginService,
|
|
|
|
secretsMigrations.ProvideMigrateFromPluginService,
|
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)),
|
2022-09-06 00:15:47 +08:00
|
|
|
acimpl.ProvideAccessControl,
|
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-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,
|
2024-01-23 00:09:08 +08:00
|
|
|
// Kubernetes API server
|
2023-09-26 06:31:58 +08:00
|
|
|
grafanaapiserver.WireSet,
|
|
|
|
apiregistry.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,
|
2024-06-18 23:07:15 +08:00
|
|
|
sqlstore.ProvideServiceWithReadReplica,
|
2021-08-25 21:11:22 +08:00
|
|
|
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)),
|
2024-07-08 22:00:13 +08:00
|
|
|
wire.Bind(new(db.ReplDB), new(*sqlstore.ReplStore)),
|
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)),
|
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,
|
2024-06-18 23:07:15 +08:00
|
|
|
sqlstore.ProvideServiceWithReadReplica,
|
2023-03-17 23:36:39 +08:00
|
|
|
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)),
|
2024-07-08 22:00:13 +08:00
|
|
|
wire.Bind(new(db.ReplDB), new(*sqlstore.ReplStore)),
|
2023-03-17 23:36:39 +08:00
|
|
|
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,
|
2024-06-18 23:07:15 +08:00
|
|
|
sqlstore.ProvideServiceWithReadReplicaForTests,
|
2021-08-25 21:11:22 +08:00
|
|
|
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)),
|
2024-06-18 23:07:15 +08:00
|
|
|
wire.Bind(new(db.ReplDB), new(*sqlstore.ReplStore)),
|
2022-04-21 21:03:17 +08:00
|
|
|
prefimpl.ProvideService,
|
2022-12-02 02:08:36 +08:00
|
|
|
oauthtoken.ProvideService,
|
|
|
|
oauthtokentest.ProvideService,
|
|
|
|
wire.Bind(new(oauthtoken.OAuthTokenService), new(*oauthtokentest.Service)),
|
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
|
|
|
|
}
|
|
|
|
|
2024-02-09 22:35:39 +08:00
|
|
|
func InitializeForTest(t sqlutil.ITestDB, cfg *setting.Cfg, opts Options, apiOpts api.ServerOptions) (*TestEnv, error) {
|
2021-08-25 21:11:22 +08:00
|
|
|
wire.Build(wireExtsTestSet)
|
2024-06-18 23:07:15 +08:00
|
|
|
return &TestEnv{Server: &Server{}, SQLStore: &sqlstore.SQLStore{}, ReadReplStore: &sqlstore.ReplStore{}, 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)
|
|
|
|
return &standalone.DummyAPIFactory{}, nil // Wire will replace this with a real interface
|
2024-01-22 22:21:27 +08:00
|
|
|
}
|