mirror of
https://github.com/grafana/grafana.git
synced 2024-12-02 05:29:42 -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
23 lines
610 B
Go
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
|
|
}
|