migrationmanager

package
v2.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager centralizes migration orchestration for core and plugin schemas.

func NewManager

func NewManager(migrator *migrationsmodule.Migrator) *Manager

NewManager constructs a Manager backed by the provided migrator.

func (*Manager) DropCore

func (m *Manager) DropCore(ctx context.Context, provider string) error

DropCore rolls back all core migrations.

func (*Manager) DropPlugins

func (m *Manager) DropPlugins(ctx context.Context, provider string, plugins []models.Plugin, selector PluginSelector) error

DropPlugins rolls back migrations for all selected plugins.

func (*Manager) Migrator

func (m *Manager) Migrator() *migrationsmodule.Migrator

Migrator exposes the underlying migrator for advanced use cases.

func (*Manager) PlanPlugins

func (m *Manager) PlanPlugins(provider string, plugins []models.Plugin, selector PluginSelector) []migrationsmodule.MigrationSet

PlanPlugins builds migration sets for plugins matching the selector.

func (*Manager) RunCore

func (m *Manager) RunCore(ctx context.Context, provider string) error

RunCore executes the core migrations for the configured provider.

func (*Manager) RunPlugins

func (m *Manager) RunPlugins(ctx context.Context, provider string, plugins []models.Plugin, selector PluginSelector) error

RunPlugins executes migrations for all selected plugins.

type PluginSelector

type PluginSelector func(plugin models.Plugin) bool

PluginSelector determines whether a plugin should participate in a migration operation.

func ComposeSelectors

func ComposeSelectors(selectors ...PluginSelector) PluginSelector

ComposeSelectors combines multiple selectors into a single predicate.

func ExceptPluginIDs

func ExceptPluginIDs(ids ...string) PluginSelector

ExceptPluginIDs returns a selector that excludes the provided plugin IDs.

func OnlyPluginIDs

func OnlyPluginIDs(ids ...string) PluginSelector

OnlyPluginIDs returns a selector that matches specific plugin IDs.

Jump to

Keyboard shortcuts

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