migrations

package
v0.0.0-...-fb7f86c Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataSourceSecretMigrationService

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

func ProvideDataSourceMigrationService

func ProvideDataSourceMigrationService(
	dataSourcesService datasources.DataSourceService,
	kvStore kvstore.KVStore,
	features featuremgmt.FeatureToggles,
) *DataSourceSecretMigrationService

func (*DataSourceSecretMigrationService) Migrate

type MigrateFromPluginService

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

MigrateFromPluginService This migrator will handle migration of the configured plugin secrets back to Grafana unified secrets

func ProvideMigrateFromPluginService

func ProvideMigrateFromPluginService(
	cfg *setting.Cfg,
	sqlStore db.DB,
	secretsService secrets.Service,
	manager plugins.SecretsPluginManager,
	kvstore kvstore.KVStore,

) *MigrateFromPluginService

func (*MigrateFromPluginService) Migrate

type MigrateToPluginService

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

MigrateToPluginService This migrator will handle migration of datasource secrets (aka Unified secrets) into the plugin secrets configured

func ProvideMigrateToPluginService

func ProvideMigrateToPluginService(
	secretsStore secretskvs.SecretsKVStore,
	cfg *setting.Cfg,
	sqlStore db.DB,
	secretsService secrets.Service,
	kvstore kvstore.KVStore,
	manager plugins.SecretsPluginManager,
) *MigrateToPluginService

func (*MigrateToPluginService) Migrate

func (s *MigrateToPluginService) Migrate(ctx context.Context) error

type SecretMigrationProvider

type SecretMigrationProvider interface {
	registry.BackgroundService
	TriggerPluginMigration(ctx context.Context, toPlugin bool) error
}

type SecretMigrationProviderImpl

type SecretMigrationProviderImpl struct {
	ServerLockService *serverlock.ServerLockService
	// contains filtered or unexported fields
}

func ProvideSecretMigrationProvider

func ProvideSecretMigrationProvider(
	cfg *setting.Cfg,
	serverLockService *serverlock.ServerLockService,
	dataSourceSecretMigrationService *DataSourceSecretMigrationService,
	migrateToPluginService *MigrateToPluginService,
	migrateFromPluginService *MigrateFromPluginService,
) *SecretMigrationProviderImpl

func (*SecretMigrationProviderImpl) Migrate

Migrate Run migration services. This will block until all services have exited. This should only be called once at startup

func (*SecretMigrationProviderImpl) Run

func (*SecretMigrationProviderImpl) TriggerPluginMigration

func (s *SecretMigrationProviderImpl) TriggerPluginMigration(ctx context.Context, toPlugin bool) error

TriggerPluginMigration Kick off a migration to or from the plugin. This will block until all services have exited.

type SecretMigrationService

type SecretMigrationService interface {
	Migrate(ctx context.Context) error
}

SecretMigrationService is used to migrate legacy secrets to new unified secrets.

Jump to

Keyboard shortcuts

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