modelmigration

package
v0.0.0-...-ed0863b Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2025 License: AGPL-3.0 Imports: 8 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 a new model migration importer to the coordinator, for importing unit states.

Types

type Coordinator

type Coordinator interface {
	Add(modelmigration.Operation)
}

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

type ExportService

type ExportService interface {
	// GetState returns the full unit state. The state may be empty.
	GetState(ctx context.Context, name coreunit.Name) (unitstate.RetrievedUnitState, error)
}

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

type ImportService

type ImportService interface {
	// SetState persists the input unit state selectively,
	// based on its populated values.
	SetState(context.Context, unitstate.UnitState) error
}

ImportService provides a subset of the unitstate domain service methods needed for the unitstate import.

Jump to

Keyboard shortcuts

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