884b573c0b
* CLI: Adjust 're-encrypt-data-keys' command
* CLI: Adjust 're-encrypt' command
* Multiple improvements on re-encrypt secrets migration
* Another bunch of code improvements
* Lint fixes
(cherry picked from commit e6a85826e9)
Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
29 lines
403 B
Go
29 lines
403 B
Go
package secretsmigrations
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/grafana/grafana/pkg/infra/log"
|
|
)
|
|
|
|
type simpleSecret struct {
|
|
tableName string
|
|
columnName string
|
|
}
|
|
|
|
type b64Secret struct {
|
|
simpleSecret
|
|
}
|
|
|
|
type jsonSecret struct {
|
|
tableName string
|
|
}
|
|
|
|
type alertingSecret struct{}
|
|
|
|
func nowInUTC() string {
|
|
return time.Now().UTC().Format("2006-01-02 15:04:05")
|
|
}
|
|
|
|
var logger = log.New("secrets.migrations")
|