Chore: Unite wire graphs for cli and server (#61143)

* Chore: unite wire graphs for cli and server

* remove cli wire once again

* try to fix runner wire injection

* unify runner initialisation
This commit is contained in:
Serge Zaitsev
2023-03-17 16:36:39 +01:00
committed by GitHub
parent f5cb8c660e
commit 2d30f33ad8
9 changed files with 84 additions and 466 deletions
@@ -3,20 +3,20 @@ package secretsmigrations
import (
"context"
"github.com/grafana/grafana/pkg/cmd/grafana-cli/runner"
"github.com/grafana/grafana/pkg/cmd/grafana-cli/utils"
"github.com/grafana/grafana/pkg/server"
)
func ReEncryptDEKS(_ utils.CommandLine, runner runner.Runner) error {
func ReEncryptDEKS(_ utils.CommandLine, runner server.Runner) error {
return runner.SecretsService.ReEncryptDataKeys(context.Background())
}
func ReEncryptSecrets(_ utils.CommandLine, runner runner.Runner) error {
func ReEncryptSecrets(_ utils.CommandLine, runner server.Runner) error {
_, err := runner.SecretsMigrator.ReEncryptSecrets(context.Background())
return err
}
func RollBackSecrets(_ utils.CommandLine, runner runner.Runner) error {
func RollBackSecrets(_ utils.CommandLine, runner server.Runner) error {
_, err := runner.SecretsMigrator.RollBackSecrets(context.Background())
return err
}