grafana/pkg/cmd/grafana-cli/commands/secretsmigrations/secretsmigrations.go
Serge Zaitsev 2d30f33ad8
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
2023-03-17 16:36:39 +01:00

23 lines
610 B
Go

package secretsmigrations
import (
"context"
"github.com/grafana/grafana/pkg/cmd/grafana-cli/utils"
"github.com/grafana/grafana/pkg/server"
)
func ReEncryptDEKS(_ utils.CommandLine, runner server.Runner) error {
return runner.SecretsService.ReEncryptDataKeys(context.Background())
}
func ReEncryptSecrets(_ utils.CommandLine, runner server.Runner) error {
_, err := runner.SecretsMigrator.ReEncryptSecrets(context.Background())
return err
}
func RollBackSecrets(_ utils.CommandLine, runner server.Runner) error {
_, err := runner.SecretsMigrator.RollBackSecrets(context.Background())
return err
}