migrator

package
v11.1.4-modfix Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBase64Secret

func NewBase64Secret(simple simpleSecret, encoding *base64.Encoding) b64Secret

func NewSimpleSecret

func NewSimpleSecret(tableName, columnName string) simpleSecret

Types

type SecretsMigrator

type SecretsMigrator struct {
	// contains filtered or unexported fields
}

func ProvideSecretsMigrator

func ProvideSecretsMigrator(
	encryptionSrv encryption.Internal,
	service *manager.SecretsService,
	sqlStore db.DB,
	settings setting.Provider,
	features featuremgmt.FeatureToggles,
) *SecretsMigrator

func (*SecretsMigrator) ReEncryptSecrets

func (m *SecretsMigrator) ReEncryptSecrets(ctx context.Context) (bool, error)

func (*SecretsMigrator) RegisterRotators

func (m *SecretsMigrator) RegisterRotators(rotators ...SecretsRotator)

func (*SecretsMigrator) RollBackSecrets

func (m *SecretsMigrator) RollBackSecrets(ctx context.Context) (bool, error)

type SecretsRotator

type SecretsRotator interface {
	ReEncrypt(context.Context, *manager.SecretsService, db.DB) bool
	Rollback(context.Context, *manager.SecretsService, encryption.Internal, db.DB, string) bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL