mirror of
https://github.com/grafana/grafana.git
synced 2024-11-30 12:44:10 -06:00
2d30f33ad8
* Chore: unite wire graphs for cli and server * remove cli wire once again * try to fix runner wire injection * unify runner initialisation
40 lines
1.2 KiB
Go
40 lines
1.2 KiB
Go
package server
|
|
|
|
import (
|
|
"github.com/grafana/grafana/pkg/infra/db"
|
|
"github.com/grafana/grafana/pkg/services/encryption"
|
|
"github.com/grafana/grafana/pkg/services/featuremgmt"
|
|
"github.com/grafana/grafana/pkg/services/secrets"
|
|
"github.com/grafana/grafana/pkg/services/secrets/manager"
|
|
"github.com/grafana/grafana/pkg/services/user"
|
|
"github.com/grafana/grafana/pkg/setting"
|
|
)
|
|
|
|
type Runner struct {
|
|
Cfg *setting.Cfg
|
|
SQLStore db.DB
|
|
SettingsProvider setting.Provider
|
|
Features featuremgmt.FeatureToggles
|
|
EncryptionService encryption.Internal
|
|
SecretsService *manager.SecretsService
|
|
SecretsMigrator secrets.Migrator
|
|
UserService user.Service
|
|
}
|
|
|
|
func NewRunner(cfg *setting.Cfg, sqlStore db.DB, settingsProvider setting.Provider,
|
|
encryptionService encryption.Internal, features featuremgmt.FeatureToggles,
|
|
secretsService *manager.SecretsService, secretsMigrator secrets.Migrator,
|
|
userService user.Service,
|
|
) Runner {
|
|
return Runner{
|
|
Cfg: cfg,
|
|
SQLStore: sqlStore,
|
|
SettingsProvider: settingsProvider,
|
|
EncryptionService: encryptionService,
|
|
SecretsService: secretsService,
|
|
SecretsMigrator: secretsMigrator,
|
|
Features: features,
|
|
UserService: userService,
|
|
}
|
|
}
|