mirror of
https://github.com/grafana/grafana.git
synced 2024-12-02 05:29:42 -06:00
05709ce411
* chore: add alias for InitTestDB and Session Adds an alias for the sqlstore InitTestDB and Session, and updates tests using these to reduce dependencies on the sqlstore.Store. * next pass of removing sqlstore imports * last little bit * remove mockstore where possible
40 lines
1.2 KiB
Go
40 lines
1.2 KiB
Go
package runner
|
|
|
|
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 New(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,
|
|
}
|
|
}
|