2021-11-17 20:43:09 +01:00
|
|
|
//go:build wireinject
|
|
|
|
|
// +build wireinject
|
|
|
|
|
|
|
|
|
|
package runner
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"context"
|
|
|
|
|
|
|
|
|
|
"github.com/google/wire"
|
2022-08-02 16:58:05 +02:00
|
|
|
sdkhttpclient "github.com/grafana/grafana-plugin-sdk-go/backend/httpclient"
|
2023-01-20 13:11:06 -05:00
|
|
|
|
2022-08-02 16:58:05 +02:00
|
|
|
"github.com/grafana/grafana/pkg/api"
|
|
|
|
|
"github.com/grafana/grafana/pkg/api/avatar"
|
2021-11-17 20:43:09 +01:00
|
|
|
"github.com/grafana/grafana/pkg/api/routing"
|
|
|
|
|
"github.com/grafana/grafana/pkg/bus"
|
2022-08-02 16:58:05 +02:00
|
|
|
"github.com/grafana/grafana/pkg/cuectx"
|
|
|
|
|
"github.com/grafana/grafana/pkg/expr"
|
2022-10-19 09:02:15 -04:00
|
|
|
"github.com/grafana/grafana/pkg/infra/db"
|
|
|
|
|
"github.com/grafana/grafana/pkg/infra/db/dbtest"
|
2022-08-02 16:58:05 +02:00
|
|
|
"github.com/grafana/grafana/pkg/infra/httpclient"
|
|
|
|
|
"github.com/grafana/grafana/pkg/infra/httpclient/httpclientprovider"
|
|
|
|
|
"github.com/grafana/grafana/pkg/infra/kvstore"
|
2021-11-17 20:43:09 +01:00
|
|
|
"github.com/grafana/grafana/pkg/infra/localcache"
|
2022-08-02 16:58:05 +02:00
|
|
|
"github.com/grafana/grafana/pkg/infra/metrics"
|
|
|
|
|
"github.com/grafana/grafana/pkg/infra/remotecache"
|
|
|
|
|
"github.com/grafana/grafana/pkg/infra/serverlock"
|
2022-01-20 11:10:12 +01:00
|
|
|
"github.com/grafana/grafana/pkg/infra/tracing"
|
2021-11-17 20:43:09 +01:00
|
|
|
"github.com/grafana/grafana/pkg/infra/usagestats"
|
2022-08-02 16:58:05 +02:00
|
|
|
uss "github.com/grafana/grafana/pkg/infra/usagestats/service"
|
|
|
|
|
"github.com/grafana/grafana/pkg/infra/usagestats/statscollector"
|
|
|
|
|
loginpkg "github.com/grafana/grafana/pkg/login"
|
|
|
|
|
"github.com/grafana/grafana/pkg/login/social"
|
|
|
|
|
"github.com/grafana/grafana/pkg/middleware/csrf"
|
2022-08-30 17:30:43 +02: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 15:36:40 -05:00
|
|
|
"github.com/grafana/grafana/pkg/registry/corekind"
|
2022-08-02 16:58:05 +02:00
|
|
|
"github.com/grafana/grafana/pkg/services/accesscontrol"
|
2022-09-05 18:15:47 +02:00
|
|
|
"github.com/grafana/grafana/pkg/services/accesscontrol/acimpl"
|
2022-08-02 16:58:05 +02:00
|
|
|
"github.com/grafana/grafana/pkg/services/accesscontrol/ossaccesscontrol"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/alerting"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/auth/jwt"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/cleanup"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/comments"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/contexthandler"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/contexthandler/authproxy"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/dashboardimport"
|
|
|
|
|
dashboardimportservice "github.com/grafana/grafana/pkg/services/dashboardimport/service"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/dashboards"
|
|
|
|
|
dashboardstore "github.com/grafana/grafana/pkg/services/dashboards/database"
|
|
|
|
|
dashboardservice "github.com/grafana/grafana/pkg/services/dashboards/service"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/dashboardsnapshots"
|
|
|
|
|
dashsnapstore "github.com/grafana/grafana/pkg/services/dashboardsnapshots/database"
|
|
|
|
|
dashsnapsvc "github.com/grafana/grafana/pkg/services/dashboardsnapshots/service"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/dashboardversion/dashverimpl"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/datasourceproxy"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/datasources"
|
|
|
|
|
datasourceservice "github.com/grafana/grafana/pkg/services/datasources/service"
|
2022-08-02 15:08:09 +02:00
|
|
|
"github.com/grafana/grafana/pkg/services/encryption"
|
|
|
|
|
encryptionservice "github.com/grafana/grafana/pkg/services/encryption/service"
|
2022-08-02 16:58:05 +02:00
|
|
|
"github.com/grafana/grafana/pkg/services/export"
|
2022-01-26 09:44:20 -08:00
|
|
|
"github.com/grafana/grafana/pkg/services/featuremgmt"
|
2022-08-02 16:58:05 +02:00
|
|
|
"github.com/grafana/grafana/pkg/services/guardian"
|
2022-02-01 10:24:59 -08:00
|
|
|
"github.com/grafana/grafana/pkg/services/hooks"
|
2022-08-02 16:58:05 +02: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"
|
|
|
|
|
authinfodatabase "github.com/grafana/grafana/pkg/services/login/authinfoservice/database"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/login/loginservice"
|
2022-11-22 11:37:18 +01:00
|
|
|
"github.com/grafana/grafana/pkg/services/loginattempt"
|
2022-09-01 18:08:42 +02:00
|
|
|
"github.com/grafana/grafana/pkg/services/loginattempt/loginattemptimpl"
|
2022-08-02 16:58:05 +02:00
|
|
|
"github.com/grafana/grafana/pkg/services/ngalert"
|
|
|
|
|
ngmetrics "github.com/grafana/grafana/pkg/services/ngalert/metrics"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/notifications"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/oauthtoken"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/org/orgimpl"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/playlist/playlistimpl"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/plugindashboards"
|
|
|
|
|
plugindashboardsservice "github.com/grafana/grafana/pkg/services/plugindashboards/service"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/pluginsettings"
|
|
|
|
|
pluginSettings "github.com/grafana/grafana/pkg/services/pluginsettings/service"
|
2022-12-01 10:08:36 -08:00
|
|
|
"github.com/grafana/grafana/pkg/services/pluginsintegration"
|
2022-08-02 16:58:05 +02:00
|
|
|
"github.com/grafana/grafana/pkg/services/preference/prefimpl"
|
|
|
|
|
"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"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/query"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/queryhistory"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/quota/quotaimpl"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/rendering"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/search"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/searchV2"
|
2021-11-17 20:43:09 +01:00
|
|
|
"github.com/grafana/grafana/pkg/services/secrets"
|
|
|
|
|
secretsDatabase "github.com/grafana/grafana/pkg/services/secrets/database"
|
2022-08-02 16:58:05 +02:00
|
|
|
secretsStore "github.com/grafana/grafana/pkg/services/secrets/kvstore"
|
2021-11-17 20:43:09 +01:00
|
|
|
secretsManager "github.com/grafana/grafana/pkg/services/secrets/manager"
|
2022-07-04 12:17:21 +02:00
|
|
|
secretsMigrator "github.com/grafana/grafana/pkg/services/secrets/migrator"
|
2022-08-02 16:58:05 +02:00
|
|
|
"github.com/grafana/grafana/pkg/services/serviceaccounts"
|
|
|
|
|
serviceaccountsmanager "github.com/grafana/grafana/pkg/services/serviceaccounts/manager"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/shorturls"
|
2023-01-12 17:13:47 +08:00
|
|
|
"github.com/grafana/grafana/pkg/services/shorturls/shorturlimpl"
|
2021-11-17 20:43:09 +01:00
|
|
|
"github.com/grafana/grafana/pkg/services/sqlstore"
|
2022-08-02 16:58:05 +02:00
|
|
|
"github.com/grafana/grafana/pkg/services/star/starimpl"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/store"
|
2022-11-30 13:42:42 -08:00
|
|
|
entitystoredummy "github.com/grafana/grafana/pkg/services/store/entity/dummy"
|
2022-08-02 16:58:05 +02:00
|
|
|
"github.com/grafana/grafana/pkg/services/store/sanitizer"
|
2022-09-21 14:04:01 +02:00
|
|
|
"github.com/grafana/grafana/pkg/services/tag"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/tag/tagimpl"
|
2022-09-20 18:58:04 +02:00
|
|
|
"github.com/grafana/grafana/pkg/services/team/teamimpl"
|
2022-08-02 16:58:05 +02: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"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/thumbs"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/updatechecker"
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/user/userimpl"
|
2021-11-17 20:43:09 +01:00
|
|
|
"github.com/grafana/grafana/pkg/setting"
|
2022-08-02 16:58:05 +02:00
|
|
|
"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"
|
|
|
|
|
"github.com/grafana/grafana/pkg/tsdb/grafanads"
|
|
|
|
|
"github.com/grafana/grafana/pkg/tsdb/graphite"
|
|
|
|
|
"github.com/grafana/grafana/pkg/tsdb/influxdb"
|
|
|
|
|
"github.com/grafana/grafana/pkg/tsdb/legacydata"
|
|
|
|
|
legacydataservice "github.com/grafana/grafana/pkg/tsdb/legacydata/service"
|
|
|
|
|
"github.com/grafana/grafana/pkg/tsdb/loki"
|
|
|
|
|
"github.com/grafana/grafana/pkg/tsdb/mssql"
|
|
|
|
|
"github.com/grafana/grafana/pkg/tsdb/mysql"
|
2022-08-10 16:47:03 -03:00
|
|
|
"github.com/grafana/grafana/pkg/tsdb/opentsdb"
|
2023-01-20 13:11:06 -05:00
|
|
|
"github.com/grafana/grafana/pkg/tsdb/parca"
|
|
|
|
|
"github.com/grafana/grafana/pkg/tsdb/phlare"
|
2022-08-02 16:58:05 +02: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"
|
2021-11-17 20:43:09 +01:00
|
|
|
"github.com/grafana/grafana/pkg/web"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
var wireSet = wire.NewSet(
|
|
|
|
|
New,
|
|
|
|
|
localcache.ProvideService,
|
2022-01-20 11:10:12 +01:00
|
|
|
tracing.ProvideService,
|
2021-11-17 20:43:09 +01:00
|
|
|
bus.ProvideBus,
|
2022-01-26 09:44:20 -08:00
|
|
|
featuremgmt.ProvideManagerService,
|
|
|
|
|
featuremgmt.ProvideToggles,
|
2021-11-17 20:43:09 +01:00
|
|
|
wire.Bind(new(bus.Bus), new(*bus.InProcBus)),
|
2022-10-19 09:02:15 -04:00
|
|
|
db.ProvideService,
|
2021-11-17 20:43:09 +01:00
|
|
|
wire.InterfaceValue(new(usagestats.Service), noOpUsageStats{}),
|
|
|
|
|
wire.InterfaceValue(new(routing.RouteRegister), noOpRouteRegister{}),
|
2022-08-02 15:08:09 +02:00
|
|
|
encryptionservice.ProvideEncryptionService,
|
|
|
|
|
wire.Bind(new(encryption.Internal), new(*encryptionservice.Service)),
|
2021-11-17 20:43:09 +01:00
|
|
|
secretsDatabase.ProvideSecretsStore,
|
|
|
|
|
wire.Bind(new(secrets.Store), new(*secretsDatabase.SecretsStoreImpl)),
|
|
|
|
|
secretsManager.ProvideSecretsService,
|
|
|
|
|
wire.Bind(new(secrets.Service), new(*secretsManager.SecretsService)),
|
2022-08-02 16:58:05 +02:00
|
|
|
hooks.ProvideService,
|
|
|
|
|
legacydataservice.ProvideService,
|
|
|
|
|
wire.Bind(new(legacydata.RequestHandler), new(*legacydataservice.Service)),
|
2022-08-03 11:17:26 -04:00
|
|
|
alerting.ProvideAlertStore,
|
2022-08-02 16:58:05 +02:00
|
|
|
alerting.ProvideAlertEngine,
|
|
|
|
|
wire.Bind(new(alerting.UsageStatsQuerier), new(*alerting.AlertEngine)),
|
|
|
|
|
api.ProvideHTTPServer,
|
|
|
|
|
query.ProvideService,
|
|
|
|
|
thumbs.ProvideService,
|
|
|
|
|
rendering.ProvideService,
|
|
|
|
|
wire.Bind(new(rendering.Service), new(*rendering.RenderingService)),
|
|
|
|
|
kvstore.ProvideService,
|
|
|
|
|
updatechecker.ProvideGrafanaService,
|
|
|
|
|
updatechecker.ProvidePluginsService,
|
|
|
|
|
uss.ProvideService,
|
2022-12-01 10:08:36 -08:00
|
|
|
pluginsintegration.WireSet,
|
2022-08-30 17:30:43 +02:00
|
|
|
pluginDashboards.ProvideFileStoreManager,
|
|
|
|
|
wire.Bind(new(pluginDashboards.FileStore), new(*pluginDashboards.FileStoreManager)),
|
2022-08-02 16:58:05 +02:00
|
|
|
cloudwatch.ProvideService,
|
|
|
|
|
cloudmonitoring.ProvideService,
|
|
|
|
|
azuremonitor.ProvideService,
|
|
|
|
|
postgres.ProvideService,
|
|
|
|
|
mysql.ProvideService,
|
|
|
|
|
mssql.ProvideService,
|
|
|
|
|
store.ProvideEntityEventsService,
|
|
|
|
|
httpclientprovider.New,
|
|
|
|
|
wire.Bind(new(httpclient.Provider), new(*sdkhttpclient.Provider)),
|
|
|
|
|
serverlock.ProvideService,
|
|
|
|
|
cleanup.ProvideService,
|
2023-01-12 17:13:47 +08:00
|
|
|
shorturlimpl.ProvideService,
|
|
|
|
|
wire.Bind(new(shorturls.Service), new(*shorturlimpl.ShortURLService)),
|
2022-08-02 16:58:05 +02:00
|
|
|
queryhistory.ProvideService,
|
|
|
|
|
wire.Bind(new(queryhistory.Service), new(*queryhistory.QueryHistoryService)),
|
|
|
|
|
quotaimpl.ProvideService,
|
|
|
|
|
remotecache.ProvideService,
|
|
|
|
|
loginservice.ProvideService,
|
|
|
|
|
wire.Bind(new(login.Service), new(*loginservice.Implementation)),
|
|
|
|
|
authinfoservice.ProvideAuthInfoService,
|
|
|
|
|
wire.Bind(new(login.AuthInfoService), new(*authinfoservice.Implementation)),
|
|
|
|
|
authinfodatabase.ProvideAuthInfoStore,
|
|
|
|
|
loginpkg.ProvideService,
|
|
|
|
|
wire.Bind(new(loginpkg.Authenticator), new(*loginpkg.AuthenticatorService)),
|
2022-09-01 18:08:42 +02:00
|
|
|
loginattemptimpl.ProvideService,
|
2022-11-22 11:37:18 +01:00
|
|
|
wire.Bind(new(loginattempt.Service), new(*loginattemptimpl.Service)),
|
2022-08-02 16:58:05 +02:00
|
|
|
datasourceproxy.ProvideService,
|
|
|
|
|
search.ProvideService,
|
|
|
|
|
searchV2.ProvideService,
|
|
|
|
|
store.ProvideService,
|
|
|
|
|
export.ProvideService,
|
|
|
|
|
live.ProvideService,
|
|
|
|
|
pushhttp.ProvideService,
|
|
|
|
|
contexthandler.ProvideService,
|
|
|
|
|
jwt.ProvideService,
|
2023-01-20 13:11:06 -05:00
|
|
|
wire.Bind(new(jwt.JWTService), new(*jwt.AuthService)),
|
2022-08-02 16:58:05 +02: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,
|
|
|
|
|
notifications.ProvideSmtpService,
|
|
|
|
|
metrics.ProvideService,
|
|
|
|
|
testdatasource.ProvideService,
|
|
|
|
|
social.ProvideService,
|
|
|
|
|
influxdb.ProvideService,
|
|
|
|
|
wire.Bind(new(social.Service), new(*social.SocialService)),
|
|
|
|
|
oauthtoken.ProvideService,
|
|
|
|
|
wire.Bind(new(oauthtoken.OAuthTokenService), new(*oauthtoken.Service)),
|
|
|
|
|
tempo.ProvideService,
|
|
|
|
|
loki.ProvideService,
|
|
|
|
|
graphite.ProvideService,
|
|
|
|
|
prometheus.ProvideService,
|
|
|
|
|
elasticsearch.ProvideService,
|
2022-10-28 13:33:37 +02:00
|
|
|
phlare.ProvideService,
|
|
|
|
|
parca.ProvideService,
|
2022-07-04 12:17:21 +02:00
|
|
|
secretsMigrator.ProvideSecretsMigrator,
|
|
|
|
|
wire.Bind(new(secrets.Migrator), new(*secretsMigrator.SecretsMigrator)),
|
2022-08-02 16:58:05 +02:00
|
|
|
grafanads.ProvideService,
|
|
|
|
|
wire.Bind(new(dashboardsnapshots.Store), new(*dashsnapstore.DashboardSnapshotStore)),
|
|
|
|
|
dashsnapstore.ProvideStore,
|
|
|
|
|
wire.Bind(new(dashboardsnapshots.Service), new(*dashsnapsvc.ServiceImpl)),
|
|
|
|
|
dashsnapsvc.ProvideService,
|
|
|
|
|
datasourceservice.ProvideService,
|
|
|
|
|
wire.Bind(new(datasources.DataSourceService), new(*datasourceservice.Service)),
|
|
|
|
|
pluginSettings.ProvideService,
|
|
|
|
|
wire.Bind(new(pluginsettings.Service), new(*pluginSettings.Service)),
|
|
|
|
|
alerting.ProvideService,
|
|
|
|
|
ossaccesscontrol.ProvideServiceAccountPermissions,
|
|
|
|
|
wire.Bind(new(accesscontrol.ServiceAccountPermissionsService), new(*ossaccesscontrol.ServiceAccountPermissionsService)),
|
|
|
|
|
serviceaccountsmanager.ProvideServiceAccountsService,
|
|
|
|
|
wire.Bind(new(serviceaccounts.Service), new(*serviceaccountsmanager.ServiceAccountsService)),
|
|
|
|
|
expr.ProvideService,
|
|
|
|
|
teamguardianDatabase.ProvideTeamGuardianStore,
|
|
|
|
|
wire.Bind(new(teamguardian.Store), new(*teamguardianDatabase.TeamGuardianStoreImpl)),
|
|
|
|
|
teamguardianManager.ProvideService,
|
|
|
|
|
dashboardservice.ProvideDashboardService,
|
|
|
|
|
dashboardstore.ProvideDashboardStore,
|
|
|
|
|
wire.Bind(new(dashboards.DashboardService), new(*dashboardservice.DashboardServiceImpl)),
|
|
|
|
|
wire.Bind(new(dashboards.DashboardProvisioningService), new(*dashboardservice.DashboardServiceImpl)),
|
|
|
|
|
wire.Bind(new(dashboards.PluginService), new(*dashboardservice.DashboardServiceImpl)),
|
|
|
|
|
wire.Bind(new(dashboards.Store), new(*dashboardstore.DashboardStore)),
|
2023-01-19 18:38:07 +02:00
|
|
|
wire.Bind(new(dashboards.FolderStore), new(*dashboardstore.DashboardStore)),
|
2022-08-02 16:58:05 +02:00
|
|
|
dashboardimportservice.ProvideService,
|
|
|
|
|
wire.Bind(new(dashboardimport.Service), new(*dashboardimportservice.ImportDashboardService)),
|
|
|
|
|
plugindashboardsservice.ProvideService,
|
|
|
|
|
wire.Bind(new(plugindashboards.Service), new(*plugindashboardsservice.Service)),
|
|
|
|
|
plugindashboardsservice.ProvideDashboardUpdater,
|
|
|
|
|
alerting.ProvideDashAlertExtractorService,
|
|
|
|
|
wire.Bind(new(alerting.DashAlertExtractor), new(*alerting.DashAlertExtractorService)),
|
|
|
|
|
comments.ProvideService,
|
|
|
|
|
guardian.ProvideService,
|
|
|
|
|
sanitizer.ProvideService,
|
|
|
|
|
secretsStore.ProvideService,
|
|
|
|
|
avatar.ProvideAvatarCacheServer,
|
|
|
|
|
authproxy.ProvideAuthProxy,
|
|
|
|
|
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 15:36:40 -05:00
|
|
|
corekind.KindSet,
|
2022-10-11 04:45:07 -04:00
|
|
|
cuectx.GrafanaCUEContext,
|
|
|
|
|
cuectx.GrafanaThemaRuntime,
|
2022-08-02 16:58:05 +02:00
|
|
|
csrf.ProvideCSRFFilter,
|
|
|
|
|
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)),
|
|
|
|
|
starimpl.ProvideService,
|
|
|
|
|
playlistimpl.ProvideService,
|
|
|
|
|
dashverimpl.ProvideService,
|
|
|
|
|
publicdashboardsService.ProvideService,
|
|
|
|
|
wire.Bind(new(publicdashboards.Service), new(*publicdashboardsService.PublicDashboardServiceImpl)),
|
|
|
|
|
publicdashboardsStore.ProvideStore,
|
|
|
|
|
wire.Bind(new(publicdashboards.Store), new(*publicdashboardsStore.PublicDashboardStoreImpl)),
|
|
|
|
|
publicdashboardsApi.ProvideApi,
|
|
|
|
|
userimpl.ProvideService,
|
|
|
|
|
orgimpl.ProvideService,
|
2022-09-20 18:58:04 +02:00
|
|
|
teamimpl.ProvideService,
|
2022-08-02 16:58:05 +02:00
|
|
|
ngmetrics.ProvideServiceForTest,
|
|
|
|
|
notifications.MockNotificationService,
|
2022-11-30 13:42:42 -08:00
|
|
|
entitystoredummy.ProvideFakeEntityServer,
|
2022-10-19 09:02:15 -04:00
|
|
|
wire.Bind(new(notifications.TempUserStore), new(*dbtest.FakeDB)),
|
2022-08-02 16:58:05 +02:00
|
|
|
wire.Bind(new(notifications.Service), new(*notifications.NotificationServiceMock)),
|
|
|
|
|
wire.Bind(new(notifications.WebhookSender), new(*notifications.NotificationServiceMock)),
|
|
|
|
|
wire.Bind(new(notifications.EmailSender), new(*notifications.NotificationServiceMock)),
|
2022-10-19 09:02:15 -04:00
|
|
|
dbtest.NewFakeDB,
|
2022-12-13 11:03:36 +01:00
|
|
|
wire.Bind(new(db.DB), new(*sqlstore.SQLStore)),
|
2022-08-02 16:58:05 +02:00
|
|
|
prefimpl.ProvideService,
|
2022-08-10 16:47:03 -03:00
|
|
|
opentsdb.ProvideService,
|
2022-09-05 18:15:47 +02:00
|
|
|
acimpl.ProvideAccessControl,
|
|
|
|
|
wire.Bind(new(accesscontrol.AccessControl), new(*acimpl.AccessControl)),
|
2022-09-21 14:04:01 +02:00
|
|
|
tagimpl.ProvideService,
|
|
|
|
|
wire.Bind(new(tag.Service), new(*tagimpl.Service)),
|
2021-11-17 20:43:09 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func Initialize(cfg *setting.Cfg) (Runner, error) {
|
|
|
|
|
wire.Build(wireExtsSet)
|
|
|
|
|
return Runner{}, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NoOp implementations of those dependencies that makes no sense to
|
|
|
|
|
// inject on CLI command executions (like the route registerer, for instance).
|
|
|
|
|
|
|
|
|
|
type noOpUsageStats struct{}
|
|
|
|
|
|
|
|
|
|
func (noOpUsageStats) GetUsageReport(context.Context) (usagestats.Report, error) {
|
|
|
|
|
return usagestats.Report{}, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (noOpUsageStats) RegisterMetricsFunc(_ usagestats.MetricsFunc) {}
|
|
|
|
|
|
|
|
|
|
func (noOpUsageStats) RegisterSendReportCallback(_ usagestats.SendReportCallbackFunc) {}
|
|
|
|
|
|
2021-11-26 18:10:36 +01:00
|
|
|
func (noOpUsageStats) ShouldBeReported(context.Context, string) bool { return false }
|
2021-11-17 20:43:09 +01:00
|
|
|
|
|
|
|
|
type noOpRouteRegister struct{}
|
|
|
|
|
|
|
|
|
|
func (noOpRouteRegister) Get(string, ...web.Handler) {}
|
|
|
|
|
|
|
|
|
|
func (noOpRouteRegister) Post(string, ...web.Handler) {}
|
|
|
|
|
|
|
|
|
|
func (noOpRouteRegister) Delete(string, ...web.Handler) {}
|
|
|
|
|
|
|
|
|
|
func (noOpRouteRegister) Put(string, ...web.Handler) {}
|
|
|
|
|
|
|
|
|
|
func (noOpRouteRegister) Patch(string, ...web.Handler) {}
|
|
|
|
|
|
|
|
|
|
func (noOpRouteRegister) Any(string, ...web.Handler) {}
|
|
|
|
|
|
|
|
|
|
func (noOpRouteRegister) Group(string, func(routing.RouteRegister), ...web.Handler) {}
|
|
|
|
|
|
|
|
|
|
func (noOpRouteRegister) Insert(string, func(routing.RouteRegister), ...web.Handler) {}
|
|
|
|
|
|
2022-01-24 10:41:18 -03:00
|
|
|
func (noOpRouteRegister) Register(routing.Router, ...routing.RegisterNamedMiddleware) {}
|
2021-11-17 20:43:09 +01:00
|
|
|
|
|
|
|
|
func (noOpRouteRegister) Reset() {}
|