modelmigration

package
v0.0.0-...-f575f4d Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterExport

func RegisterExport(coordinator Coordinator)

RegisterExport registers the export operations with the given coordinator.

func RegisterImport

func RegisterImport(coordinator Coordinator)

RegisterImport registers the import operations with the given coordinator.

Types

type Coordinator

type Coordinator interface {
	// Add adds the given operation to the migration.
	Add(modelmigration.Operation)
}

Coordinator is the interface that is used to add operations to a migration.

type ExportService

type ExportService interface {
	// ControllerForModel returns the controller record that's associated
	// with the modelUUID.
	ControllerForModel(ctx context.Context, modelUUID string) (*crossmodel.ControllerInfo, error)

	// ModelsForController returns the list of model UUIDs for
	// the given controllerUUID.
	ModelsForController(ctx context.Context, controllerUUID string) ([]string, error)

	// ControllersForModels returns the list of controllers which
	// are part of the given modelUUIDs.
	// The resulting MigrationControllerInfo contains the list of models
	// for each controller.
	ControllersForModels(ctx context.Context, modelUUIDs ...string) ([]crossmodel.ControllerInfo, error)
}

ExportService provides a subset of the external controller domain service methods needed for external controller export.

type ImportService

type ImportService interface {
	ImportExternalControllers(context.Context, []crossmodel.ControllerInfo) error
}

Jump to

Keyboard shortcuts

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