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"
|
2023-03-01 11:42:53 -06: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-10-19 08:02:15 -05:00
|
|
|
"github.com/grafana/grafana/pkg/infra/db"
|
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"
|
2023-03-06 13:06:52 -06:00
|
|
|
"github.com/grafana/grafana/pkg/modules"
|
2022-08-30 10:30:43 -05:00
|
|
|
pluginDashboards "github.com/grafana/grafana/pkg/plugins/manager/dashboards"
|
Reconcile coremodels, entities, objects under new kind framework (#56492)
* Update thema to latest
* Deal with s/Library/*Runtime/
* Commit new, working results of codegen
* We like pointers now
* Always take runtime arg for NewBase()
* Sketchy handwavy pass at entity meta framework
* Little nibbles
* Update pkg/framework/coremodel/entityframework.cue
Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
* Move file into new framework location
* Introduce loaders, Go code
* Complete rename to kind
* Flesh out framework, add svg/dashboard examples
* Cruft removal
* Remove generated kind go files from gitignore
* Refine maturity concept, add SlotKind
* Update embed and go deps
* Export PrefixWithGrafanaCUE
* Make the loader actually work, holy crap
* Many small tweaks to type.cue
* Add Apache 2 licensing exceptions for kinds
* Add new kinds dir, start of generator
* Roll back to earlier oapi-codegen
* Introduce new grafana-specific CUE loaders
* Introduce new tidy code generators framework
* Catch up kind framework with tinkering
* Add slices for the generators
* Add write/verify step to main generator
* Many renames
* Split up kind framework cue files
* Use kind.Decl within generated kinds
* Create kind.SomeDecl wrapper type to cache lineages
* Better names again
* Get one generated implemented, hopefully
* Copy dashboard schema into new kind.cue
* Small fixes to make the initial gen work
* Put svg kind in its new home
* Add generated Go dashboard type
* More renames and cleanups
* Add base kind registry and generator
* Stop blacklisting *_gen.go files
This is not the Go best practice, anyway. All we actually want to ignore
for enterprise is generated wire files.
* Change codegen output directories
pkg/kind -> pkg/kinds
pkg/registry/kindreg -> pkg/registry/corekind
* Rename pkg/framework/kind to pkg/kindsys
* Add core structured kind generator
* Add plural and machine names to kind spec
* Copy playlist over to kind system
* Consolidate kindsys files
* Add raw kind generator
* Update CODEOWNERS for kind framework
* Touch up comments a bit
* More docs tweaks
* Remove generated types to reduce noise for review
* Split each generator into its own file
* Rename Slot kind to Composable kind
* Add handwavy types for customkind loading
* Guard against init calls to framework loader
* First pass at doc on extending the kind system
* Improve attribute example in docs
* Fix wire imports
* Add basic TS types generator
* Fix composable kind category def
* No need for a separate file with generate directive
* Catch dashboard schema up
* Rename generator types to something saner and generic
* Make version configurable in ts/go generators
* Add CommonMeta to ease property access
* Add kindsys prop indicating whether lineage is group
* Put all kind categories back in a single file
* Finish with kindsys group props
* Refactor maturity progression per discussion
- Replace "committed" with "merged"
- All kindcats can use all maturity levels, at least for now
* Convert ts veneer index generator to modular system
* Move over to new jennywrites framework
* Strip down old coremodel generator
* Use public version of jennywrites
* Pull latest thema
* Commit generated Go types
* Add header injection postprocessor
* Move sdboyer/jennywrites to grafana/codejen
* Tweak header output
* Remove dashboard and playlist coremodels
* Fix up backend dashboards devenv test
* Fix TS import patterns to new gen filename
* Update internal imports, remove coremodel registry
* Fix compilation errors, wire generation
* Export and replace the prefix dropper
* More Go struct and field name changes
* Last name fixes, hopefully
* Fix lint errors
* Last lint error
Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
2022-11-10 14:36:40 -06:00
|
|
|
"github.com/grafana/grafana/pkg/registry/corekind"
|
2022-05-10 08:48:47 -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"
|
2022-05-10 08:48:47 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/accesscontrol/ossaccesscontrol"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/alerting"
|
2022-09-27 06:58:49 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/annotations"
|
|
|
|
"github.com/grafana/grafana/pkg/services/annotations/annotationsimpl"
|
2022-08-02 09:55:19 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/apikey/apikeyimpl"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/auth/jwt"
|
2022-12-02 08:10:03 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/authn"
|
|
|
|
"github.com/grafana/grafana/pkg/services/authn/authnimpl"
|
2021-08-25 08:11:22 -05:00
|
|
|
"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-07-25 09:19:07 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/correlations"
|
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
|
|
|
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-08-02 08:08:09 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/encryption"
|
|
|
|
encryptionservice "github.com/grafana/grafana/pkg/services/encryption/service"
|
2022-01-26 11:44:20 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/featuremgmt"
|
2023-03-07 10:22:30 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/folder"
|
2022-10-10 14:47:53 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/folder/folderimpl"
|
2022-09-26 15:25:34 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/grpcserver"
|
2022-10-04 15:31:02 -05:00
|
|
|
grpccontext "github.com/grafana/grafana/pkg/services/grpcserver/context"
|
|
|
|
"github.com/grafana/grafana/pkg/services/grpcserver/interceptors"
|
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"
|
2023-02-08 02:32:59 -06:00
|
|
|
ldapapi "github.com/grafana/grafana/pkg/services/ldap/api"
|
2023-02-10 12:01:55 -06:00
|
|
|
ldapservice "github.com/grafana/grafana/pkg/services/ldap/service"
|
2021-08-25 08:11:22 -05: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"
|
|
|
|
"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"
|
2022-11-22 04:37:18 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/loginattempt"
|
2022-09-01 11:08:42 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/loginattempt/loginattemptimpl"
|
2022-09-22 15:04:48 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/navtree/navtreeimpl"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/ngalert"
|
2022-08-09 09:28:36 -05:00
|
|
|
ngimage "github.com/grafana/grafana/pkg/services/ngalert/image"
|
2021-08-25 08:11:22 -05:00
|
|
|
ngmetrics "github.com/grafana/grafana/pkg/services/ngalert/metrics"
|
2022-08-09 09:28:36 -05:00
|
|
|
ngstore "github.com/grafana/grafana/pkg/services/ngalert/store"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/notifications"
|
|
|
|
"github.com/grafana/grafana/pkg/services/oauthtoken"
|
2022-12-01 12:08:36 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/oauthtoken/oauthtokentest"
|
2022-06-28 07:32:25 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/org/orgimpl"
|
2022-09-27 06:58:49 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/playlist/playlistimpl"
|
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"
|
2022-12-01 12:08:36 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/pluginsintegration"
|
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"
|
2022-10-07 13:31:45 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/querylibrary/querylibraryimpl"
|
2022-07-15 11:06:44 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/quota/quotaimpl"
|
2021-08-25 08:11:22 -05:00
|
|
|
"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"
|
2022-07-12 15:27:37 -05:00
|
|
|
secretsMigrations "github.com/grafana/grafana/pkg/services/secrets/kvstore/migrations"
|
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"
|
2022-12-13 07:56:10 -06:00
|
|
|
serviceaccountsretriever "github.com/grafana/grafana/pkg/services/serviceaccounts/retriever"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/shorturls"
|
2023-01-12 03:13:47 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/shorturls/shorturlimpl"
|
2021-08-25 08:11:22 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/sqlstore"
|
2023-01-25 08:58:54 -06:00
|
|
|
starApi "github.com/grafana/grafana/pkg/services/star/api"
|
2022-05-16 09:42:02 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/star/starimpl"
|
2022-11-30 11:11:07 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/stats/statsimpl"
|
2022-03-17 12:19:23 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/store"
|
2022-11-30 15:42:42 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/store/entity/httpentitystore"
|
|
|
|
"github.com/grafana/grafana/pkg/services/store/entity/sqlstash"
|
2022-10-08 11:05:46 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/store/kind"
|
2022-10-19 09:33:26 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/store/resolver"
|
2022-09-27 06:58:49 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/store/sanitizer"
|
2023-01-04 10:33:18 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/supportbundles"
|
2023-02-06 10:50:03 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/supportbundles/bundleregistry"
|
2023-01-04 10:33:18 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/supportbundles/supportbundlesimpl"
|
2022-09-21 07:04:01 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/tag"
|
|
|
|
"github.com/grafana/grafana/pkg/services/tag/tagimpl"
|
2022-09-20 05:14:00 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/team/teamimpl"
|
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"
|
2022-09-20 04:29:17 -05:00
|
|
|
tempuser "github.com/grafana/grafana/pkg/services/temp_user"
|
2022-08-12 11:13:23 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/temp_user/tempuserimpl"
|
2021-12-23 11:43:53 -06:00
|
|
|
"github.com/grafana/grafana/pkg/services/thumbs"
|
2022-09-27 07:46:03 -05:00
|
|
|
"github.com/grafana/grafana/pkg/services/thumbs/dashboardthumbsimpl"
|
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"
|
2022-10-28 06:33:37 -05:00
|
|
|
"github.com/grafana/grafana/pkg/tsdb/parca"
|
|
|
|
"github.com/grafana/grafana/pkg/tsdb/phlare"
|
2021-08-25 08:11:22 -05:00
|
|
|
"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)),
|
2022-09-19 02:54:37 -05:00
|
|
|
annotationsimpl.ProvideService,
|
|
|
|
wire.Bind(new(annotations.Repository), new(*annotationsimpl.RepositoryImpl)),
|
2022-08-03 10:17:26 -05:00
|
|
|
alerting.ProvideAlertStore,
|
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,
|
2023-02-06 10:50:03 -06:00
|
|
|
bundleregistry.ProvideService,
|
|
|
|
wire.Bind(new(supportbundles.Service), new(*bundleregistry.Service)),
|
2022-09-27 07:46:03 -05:00
|
|
|
dashboardthumbsimpl.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-12-01 12:08:36 -06:00
|
|
|
pluginsintegration.WireSet,
|
2022-08-30 10:30:43 -05:00
|
|
|
pluginDashboards.ProvideFileStoreManager,
|
|
|
|
wire.Bind(new(pluginDashboards.FileStore), new(*pluginDashboards.FileStoreManager)),
|
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,
|
2022-09-22 07:27:48 -05:00
|
|
|
annotationsimpl.ProvideCleanupService,
|
|
|
|
wire.Bind(new(annotations.Cleaner), new(*annotationsimpl.CleanupServiceImpl)),
|
2021-08-25 08:11:22 -05:00
|
|
|
cleanup.ProvideService,
|
2023-01-12 03:13:47 -06:00
|
|
|
shorturlimpl.ProvideService,
|
|
|
|
wire.Bind(new(shorturls.Service), new(*shorturlimpl.ShortURLService)),
|
2022-01-28 10:55:09 -06:00
|
|
|
queryhistory.ProvideService,
|
|
|
|
wire.Bind(new(queryhistory.Service), new(*queryhistory.QueryHistoryService)),
|
2022-07-25 09:19:07 -05:00
|
|
|
correlations.ProvideService,
|
|
|
|
wire.Bind(new(correlations.Service), new(*correlations.CorrelationsService)),
|
2022-07-15 11:06:44 -05:00
|
|
|
quotaimpl.ProvideService,
|
2021-08-25 08:11:22 -05:00
|
|
|
remotecache.ProvideService,
|
2023-02-21 09:21:18 -06:00
|
|
|
wire.Bind(new(remotecache.CacheStorage), new(*remotecache.RemoteCache)),
|
2021-08-25 08:11:22 -05:00
|
|
|
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,
|
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-09-22 18:02:09 -05:00
|
|
|
searchV2.ProvideSearchHTTPService,
|
2022-03-17 12:19:23 -05:00
|
|
|
store.ProvideService,
|
2022-11-24 08:15:32 -06:00
|
|
|
store.ProvideSystemUsersService,
|
2021-08-25 08:11:22 -05:00
|
|
|
live.ProvideService,
|
|
|
|
pushhttp.ProvideService,
|
|
|
|
contexthandler.ProvideService,
|
2023-02-10 12:01:55 -06:00
|
|
|
ldapservice.ProvideService,
|
|
|
|
wire.Bind(new(ldapservice.LDAP), new(*ldapservice.LDAPImpl)),
|
2021-08-25 08:11:22 -05:00
|
|
|
jwt.ProvideService,
|
2023-01-20 12:11:06 -06:00
|
|
|
wire.Bind(new(jwt.JWTService), new(*jwt.AuthService)),
|
2022-08-09 09:28:36 -05:00
|
|
|
ngstore.ProvideDBStore,
|
|
|
|
ngimage.ProvideDeleteExpiredService,
|
2021-08-25 08:11:22 -05: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-13 15:19:15 -06:00
|
|
|
notifications.ProvideSmtpService,
|
2021-08-25 08:11:22 -05:00
|
|
|
tracing.ProvideService,
|
|
|
|
metrics.ProvideService,
|
|
|
|
testdatasource.ProvideService,
|
2023-02-08 02:32:59 -06:00
|
|
|
ldapapi.ProvideService,
|
2021-08-25 08:11:22 -05:00
|
|
|
opentsdb.ProvideService,
|
|
|
|
social.ProvideService,
|
|
|
|
influxdb.ProvideService,
|
|
|
|
wire.Bind(new(social.Service), new(*social.SocialService)),
|
|
|
|
tempo.ProvideService,
|
|
|
|
loki.ProvideService,
|
|
|
|
graphite.ProvideService,
|
|
|
|
prometheus.ProvideService,
|
|
|
|
elasticsearch.ProvideService,
|
2022-10-28 06:33:37 -05:00
|
|
|
phlare.ProvideService,
|
|
|
|
parca.ProvideService,
|
2022-08-02 08:08:09 -05:00
|
|
|
encryptionservice.ProvideEncryptionService,
|
|
|
|
wire.Bind(new(encryption.Internal), new(*encryptionservice.Service)),
|
2021-10-12 09:08:07 -05:00
|
|
|
secretsManager.ProvideSecretsService,
|
|
|
|
wire.Bind(new(secrets.Service), new(*secretsManager.SecretsService)),
|
|
|
|
secretsDatabase.ProvideSecretsStore,
|
2022-10-07 13:31:45 -05:00
|
|
|
querylibraryimpl.ProvideService,
|
|
|
|
querylibraryimpl.ProvideHTTPService,
|
2021-10-12 09:08:07 -05:00
|
|
|
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)),
|
2021-10-07 09:33:50 -05:00
|
|
|
alerting.ProvideService,
|
2022-12-13 07:56:10 -06:00
|
|
|
serviceaccountsretriever.ProvideService,
|
|
|
|
wire.Bind(new(serviceaccountsretriever.ServiceAccountRetriever), new(*serviceaccountsretriever.Service)),
|
2022-07-08 04:53:18 -05:00
|
|
|
ossaccesscontrol.ProvideServiceAccountPermissions,
|
|
|
|
wire.Bind(new(accesscontrol.ServiceAccountPermissionsService), new(*ossaccesscontrol.ServiceAccountPermissionsService)),
|
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,
|
2022-01-26 11:44:20 -06:00
|
|
|
featuremgmt.ProvideManagerService,
|
|
|
|
featuremgmt.ProvideToggles,
|
2023-01-25 13:10:16 -06:00
|
|
|
dashboardservice.ProvideDashboardService, // DashboardServiceImpl
|
2022-02-16 07:15:44 -06:00
|
|
|
dashboardstore.ProvideDashboardStore,
|
2022-10-10 14:47:53 -05:00
|
|
|
folderimpl.ProvideService,
|
2023-02-01 07:43:21 -06:00
|
|
|
folderimpl.ProvideDashboardFolderStore,
|
2023-01-25 13:10:16 -06:00
|
|
|
dashboardservice.ProvideSimpleDashboardService,
|
|
|
|
dashboardservice.ProvideDashboardProvisioningService,
|
|
|
|
dashboardservice.ProvideDashboardPluginService,
|
2023-02-01 07:43:21 -06:00
|
|
|
wire.Bind(new(folder.FolderStore), new(*folderimpl.DashboardFolderStoreImpl)),
|
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,
|
Reconcile coremodels, entities, objects under new kind framework (#56492)
* Update thema to latest
* Deal with s/Library/*Runtime/
* Commit new, working results of codegen
* We like pointers now
* Always take runtime arg for NewBase()
* Sketchy handwavy pass at entity meta framework
* Little nibbles
* Update pkg/framework/coremodel/entityframework.cue
Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
* Move file into new framework location
* Introduce loaders, Go code
* Complete rename to kind
* Flesh out framework, add svg/dashboard examples
* Cruft removal
* Remove generated kind go files from gitignore
* Refine maturity concept, add SlotKind
* Update embed and go deps
* Export PrefixWithGrafanaCUE
* Make the loader actually work, holy crap
* Many small tweaks to type.cue
* Add Apache 2 licensing exceptions for kinds
* Add new kinds dir, start of generator
* Roll back to earlier oapi-codegen
* Introduce new grafana-specific CUE loaders
* Introduce new tidy code generators framework
* Catch up kind framework with tinkering
* Add slices for the generators
* Add write/verify step to main generator
* Many renames
* Split up kind framework cue files
* Use kind.Decl within generated kinds
* Create kind.SomeDecl wrapper type to cache lineages
* Better names again
* Get one generated implemented, hopefully
* Copy dashboard schema into new kind.cue
* Small fixes to make the initial gen work
* Put svg kind in its new home
* Add generated Go dashboard type
* More renames and cleanups
* Add base kind registry and generator
* Stop blacklisting *_gen.go files
This is not the Go best practice, anyway. All we actually want to ignore
for enterprise is generated wire files.
* Change codegen output directories
pkg/kind -> pkg/kinds
pkg/registry/kindreg -> pkg/registry/corekind
* Rename pkg/framework/kind to pkg/kindsys
* Add core structured kind generator
* Add plural and machine names to kind spec
* Copy playlist over to kind system
* Consolidate kindsys files
* Add raw kind generator
* Update CODEOWNERS for kind framework
* Touch up comments a bit
* More docs tweaks
* Remove generated types to reduce noise for review
* Split each generator into its own file
* Rename Slot kind to Composable kind
* Add handwavy types for customkind loading
* Guard against init calls to framework loader
* First pass at doc on extending the kind system
* Improve attribute example in docs
* Fix wire imports
* Add basic TS types generator
* Fix composable kind category def
* No need for a separate file with generate directive
* Catch dashboard schema up
* Rename generator types to something saner and generic
* Make version configurable in ts/go generators
* Add CommonMeta to ease property access
* Add kindsys prop indicating whether lineage is group
* Put all kind categories back in a single file
* Finish with kindsys group props
* Refactor maturity progression per discussion
- Replace "committed" with "merged"
- All kindcats can use all maturity levels, at least for now
* Convert ts veneer index generator to modular system
* Move over to new jennywrites framework
* Strip down old coremodel generator
* Use public version of jennywrites
* Pull latest thema
* Commit generated Go types
* Add header injection postprocessor
* Move sdboyer/jennywrites to grafana/codejen
* Tweak header output
* Remove dashboard and playlist coremodels
* Fix up backend dashboards devenv test
* Fix TS import patterns to new gen filename
* Update internal imports, remove coremodel registry
* Fix compilation errors, wire generation
* Export and replace the prefix dropper
* More Go struct and field name changes
* Last name fixes, hopefully
* Fix lint errors
* Last lint error
Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
2022-11-10 14:36:40 -06:00
|
|
|
corekind.KindSet,
|
2022-10-11 03:45:07 -05:00
|
|
|
cuectx.GrafanaCUEContext,
|
|
|
|
cuectx.GrafanaThemaRuntime,
|
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-07-18 04:26:35 -05:00
|
|
|
playlistimpl.ProvideService,
|
2022-08-02 09:55:19 -05:00
|
|
|
apikeyimpl.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,
|
2023-01-25 08:58:54 -06:00
|
|
|
starApi.ProvideApi,
|
2022-06-28 07:32:25 -05:00
|
|
|
userimpl.ProvideService,
|
|
|
|
orgimpl.ProvideService,
|
2022-11-30 11:11:07 -06:00
|
|
|
statsimpl.ProvideService,
|
2022-10-04 15:31:02 -05:00
|
|
|
grpccontext.ProvideContextHandler,
|
2022-09-26 15:25:34 -05:00
|
|
|
grpcserver.ProvideService,
|
|
|
|
grpcserver.ProvideHealthService,
|
2022-09-28 13:00:46 -05:00
|
|
|
grpcserver.ProvideReflectionService,
|
2022-10-04 15:31:02 -05:00
|
|
|
interceptors.ProvideAuthenticator,
|
2022-11-04 16:30:22 -05:00
|
|
|
kind.ProvideService, // The registry of known kinds
|
2022-11-30 15:42:42 -06:00
|
|
|
sqlstash.ProvideSQLEntityServer,
|
|
|
|
resolver.ProvideEntityReferenceResolver,
|
|
|
|
httpentitystore.ProvideHTTPEntityStore,
|
2022-09-20 05:14:00 -05:00
|
|
|
teamimpl.ProvideService,
|
2022-08-12 11:13:23 -05:00
|
|
|
tempuserimpl.ProvideService,
|
2022-08-17 01:34:23 -05:00
|
|
|
loginattemptimpl.ProvideService,
|
2022-11-22 04:37:18 -06:00
|
|
|
wire.Bind(new(loginattempt.Service), new(*loginattemptimpl.Service)),
|
2022-08-25 16:04:44 -05:00
|
|
|
secretsMigrations.ProvideDataSourceMigrationService,
|
|
|
|
secretsMigrations.ProvideMigrateToPluginService,
|
|
|
|
secretsMigrations.ProvideMigrateFromPluginService,
|
2022-09-06 14:21:25 -05:00
|
|
|
secretsMigrations.ProvideSecretMigrationProvider,
|
|
|
|
wire.Bind(new(secretsMigrations.SecretMigrationProvider), new(*secretsMigrations.SecretMigrationProviderImpl)),
|
2022-09-05 11:15:47 -05:00
|
|
|
acimpl.ProvideAccessControl,
|
2022-09-22 15:04:48 -05:00
|
|
|
navtreeimpl.ProvideService,
|
2022-09-05 11:15:47 -05:00
|
|
|
wire.Bind(new(accesscontrol.AccessControl), new(*acimpl.AccessControl)),
|
2022-09-20 04:29:17 -05:00
|
|
|
wire.Bind(new(notifications.TempUserStore), new(tempuser.Service)),
|
2022-09-21 07:04:01 -05:00
|
|
|
tagimpl.ProvideService,
|
|
|
|
wire.Bind(new(tag.Service), new(*tagimpl.Service)),
|
2022-12-02 08:10:03 -06:00
|
|
|
authnimpl.ProvideService,
|
|
|
|
wire.Bind(new(authn.Service), new(*authnimpl.Service)),
|
2022-12-20 04:13:37 -06:00
|
|
|
supportbundlesimpl.ProvideService,
|
2023-03-06 13:06:52 -06:00
|
|
|
modules.WireSet,
|
2021-08-25 08:11:22 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
var wireSet = wire.NewSet(
|
|
|
|
wireBasicSet,
|
2023-02-28 09:12:23 -06:00
|
|
|
metrics.ProvideRegisterer,
|
2021-08-25 08:11:22 -05:00
|
|
|
sqlstore.ProvideService,
|
|
|
|
ngmetrics.ProvideService,
|
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-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,
|
2022-12-01 12:08:36 -06:00
|
|
|
oauthtoken.ProvideService,
|
|
|
|
wire.Bind(new(oauthtoken.OAuthTokenService), new(*oauthtoken.Service)),
|
2021-08-25 08:11:22 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
var wireTestSet = wire.NewSet(
|
|
|
|
wireBasicSet,
|
|
|
|
ProvideTestEnv,
|
2023-02-28 09:12:23 -06:00
|
|
|
metrics.ProvideRegistererForTest,
|
2021-08-25 08:11:22 -05:00
|
|
|
sqlstore.ProvideServiceForTests,
|
|
|
|
ngmetrics.ProvideServiceForTest,
|
2022-01-26 09:42:40 -06: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 08:03:17 -05:00
|
|
|
wire.Bind(new(db.DB), new(*sqlstore.SQLStore)),
|
|
|
|
prefimpl.ProvideService,
|
2022-12-01 12:08:36 -06:00
|
|
|
oauthtoken.ProvideService,
|
|
|
|
oauthtokentest.ProvideService,
|
|
|
|
wire.Bind(new(oauthtoken.OAuthTokenService), new(*oauthtokentest.Service)),
|
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
|
|
|
|
}
|