Encryption: Move secrets migrations into secrets.Migrator (#51014)

This commit is contained in:
Joan López de la Franca Beltran
2022-07-04 12:17:21 +02:00
committed by GitHub
parent 6844ac9879
commit 38bcd37fba
10 changed files with 171 additions and 123 deletions
+6
View File
@@ -69,3 +69,9 @@ func KeyLabel(scope string, providerID ProviderID) string {
type BackgroundProvider interface {
Run(ctx context.Context) error
}
// Migrator is responsible for secrets migrations like re-encrypting or rolling back secrets.
type Migrator interface {
ReEncryptSecrets(ctx context.Context) error
RollBackSecrets(ctx context.Context) error
}