space_migration

package
v0.56.1 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: Apache-2.0 Imports: 54 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MigrationOperation_name = map[int32]string{
		0: "MIGRATION_OPERATION_UNSPECIFIED",
		1: "MIGRATION_OPERATION_COPY",
		2: "MIGRATION_OPERATION_MERGE",
		3: "MIGRATION_OPERATION_COPY_OBJECTS",
		4: "MIGRATION_OPERATION_MOVE_OBJECTS",
		5: "MIGRATION_OPERATION_SPLIT",
	}
	MigrationOperation_value = map[string]int32{
		"MIGRATION_OPERATION_UNSPECIFIED":  0,
		"MIGRATION_OPERATION_COPY":         1,
		"MIGRATION_OPERATION_MERGE":        2,
		"MIGRATION_OPERATION_COPY_OBJECTS": 3,
		"MIGRATION_OPERATION_MOVE_OBJECTS": 4,
		"MIGRATION_OPERATION_SPLIT":        5,
	}
)

Enum value maps for MigrationOperation.

View Source
var (
	MigrationClassification_name = map[int32]string{
		0: "MIGRATION_CLASSIFICATION_UNCLASSIFIED",
		1: "MIGRATION_CLASSIFICATION_SPACE_LOCAL_OPAQUE",
		2: "MIGRATION_CLASSIFICATION_REWRITE",
		3: "MIGRATION_CLASSIFICATION_EXTERNAL_REF",
		4: "MIGRATION_CLASSIFICATION_NON_MIGRATABLE",
	}
	MigrationClassification_value = map[string]int32{
		"MIGRATION_CLASSIFICATION_UNCLASSIFIED":       0,
		"MIGRATION_CLASSIFICATION_SPACE_LOCAL_OPAQUE": 1,
		"MIGRATION_CLASSIFICATION_REWRITE":            2,
		"MIGRATION_CLASSIFICATION_EXTERNAL_REF":       3,
		"MIGRATION_CLASSIFICATION_NON_MIGRATABLE":     4,
	}
)

Enum value maps for MigrationClassification.

View Source
var (
	MigrationReferenceKind_name = map[int32]string{
		0: "MIGRATION_REFERENCE_KIND_UNSPECIFIED",
		1: "MIGRATION_REFERENCE_KIND_OBJECT_KEY",
		2: "MIGRATION_REFERENCE_KIND_NESTED_SHARED_OBJECT",
		3: "MIGRATION_REFERENCE_KIND_CANVAS_NODE",
		4: "MIGRATION_REFERENCE_KIND_GRAPH_IRI",
		5: "MIGRATION_REFERENCE_KIND_EXTERNAL",
		6: "MIGRATION_REFERENCE_KIND_BLOCK_STORE",
	}
	MigrationReferenceKind_value = map[string]int32{
		"MIGRATION_REFERENCE_KIND_UNSPECIFIED":          0,
		"MIGRATION_REFERENCE_KIND_OBJECT_KEY":           1,
		"MIGRATION_REFERENCE_KIND_NESTED_SHARED_OBJECT": 2,
		"MIGRATION_REFERENCE_KIND_CANVAS_NODE":          3,
		"MIGRATION_REFERENCE_KIND_GRAPH_IRI":            4,
		"MIGRATION_REFERENCE_KIND_EXTERNAL":             5,
		"MIGRATION_REFERENCE_KIND_BLOCK_STORE":          6,
	}
)

Enum value maps for MigrationReferenceKind.

View Source
var (
	MigrationConflictKind_name = map[int32]string{
		0: "MIGRATION_CONFLICT_KIND_UNSPECIFIED",
		1: "MIGRATION_CONFLICT_KIND_OBJECT_KEY",
		2: "MIGRATION_CONFLICT_KIND_EXTERNAL_REFERENCE",
		3: "MIGRATION_CONFLICT_KIND_NON_MIGRATABLE",
	}
	MigrationConflictKind_value = map[string]int32{
		"MIGRATION_CONFLICT_KIND_UNSPECIFIED":        0,
		"MIGRATION_CONFLICT_KIND_OBJECT_KEY":         1,
		"MIGRATION_CONFLICT_KIND_EXTERNAL_REFERENCE": 2,
		"MIGRATION_CONFLICT_KIND_NON_MIGRATABLE":     3,
	}
)

Enum value maps for MigrationConflictKind.

View Source
var (
	MigrationConflictResolution_name = map[int32]string{
		0: "MIGRATION_CONFLICT_RESOLUTION_UNSPECIFIED",
		1: "MIGRATION_CONFLICT_RESOLUTION_DEDUPLICATE",
		2: "MIGRATION_CONFLICT_RESOLUTION_RENAME",
		3: "MIGRATION_CONFLICT_RESOLUTION_KEEP_DESTINATION",
		4: "MIGRATION_CONFLICT_RESOLUTION_REPLACE",
		5: "MIGRATION_CONFLICT_RESOLUTION_COMBINE",
	}
	MigrationConflictResolution_value = map[string]int32{
		"MIGRATION_CONFLICT_RESOLUTION_UNSPECIFIED":      0,
		"MIGRATION_CONFLICT_RESOLUTION_DEDUPLICATE":      1,
		"MIGRATION_CONFLICT_RESOLUTION_RENAME":           2,
		"MIGRATION_CONFLICT_RESOLUTION_KEEP_DESTINATION": 3,
		"MIGRATION_CONFLICT_RESOLUTION_REPLACE":          4,
		"MIGRATION_CONFLICT_RESOLUTION_COMBINE":          5,
	}
)

Enum value maps for MigrationConflictResolution.

View Source
var (
	MigrationTerminalState_name = map[int32]string{
		0: "MIGRATION_TERMINAL_STATE_UNSPECIFIED",
		1: "MIGRATION_TERMINAL_STATE_PREVIEW_READY",
		2: "MIGRATION_TERMINAL_STATE_BLOCKED",
		3: "MIGRATION_TERMINAL_STATE_STALE",
		4: "MIGRATION_TERMINAL_STATE_FAILED",
	}
	MigrationTerminalState_value = map[string]int32{
		"MIGRATION_TERMINAL_STATE_UNSPECIFIED":   0,
		"MIGRATION_TERMINAL_STATE_PREVIEW_READY": 1,
		"MIGRATION_TERMINAL_STATE_BLOCKED":       2,
		"MIGRATION_TERMINAL_STATE_STALE":         3,
		"MIGRATION_TERMINAL_STATE_FAILED":        4,
	}
)

Enum value maps for MigrationTerminalState.

View Source
var ErrCapacityInsufficient = errors.New("destination capacity is insufficient")

ErrCapacityInsufficient identifies a destination capacity preflight failure.

View Source
var ErrHandlerMissing = errors.New("migration handler is missing")

ErrHandlerMissing identifies an ObjectType with no migration classification.

View Source
var ErrPayloadSchemaRefused = errors.New("migration payload schema refused")

ErrPayloadSchemaRefused identifies a built-in payload whose schema is not admitted in Phase 0.

View Source
var ErrPlanBlocked = errors.New("migration preview is blocked")

ErrPlanBlocked identifies a preview with one or more typed blockers.

View Source
var ErrStalePlan = errors.New("migration preview is stale")

ErrStalePlan identifies source or destination drift after preview.

View Source
var ErrUnknownOperation = errors.New("unknown migration operation")

ErrUnknownOperation identifies an unsupported migration operation enum.

Functions

func DeterministicIdentity

func DeterministicIdentity(namespace, kind, source string) string

DeterministicIdentity derives a stable destination identity for a source value.

Types

type Classification

type Classification int32

Classification describes the migration safety policy for an ObjectType.

const (
	// ClassificationUnclassified is a typed blocker when no handler is present.
	ClassificationUnclassified Classification = Classification(MigrationClassification_MIGRATION_CLASSIFICATION_UNCLASSIFIED)
	// ClassificationSpaceLocalOpaque allows cloning without reference rewriting.
	ClassificationSpaceLocalOpaque Classification = Classification(MigrationClassification_MIGRATION_CLASSIFICATION_SPACE_LOCAL_OPAQUE)
	// ClassificationRewrite requires typed reference rewriting.
	ClassificationRewrite Classification = Classification(MigrationClassification_MIGRATION_CLASSIFICATION_REWRITE)
	// ClassificationExternalRef preserves and discloses an external reference.
	ClassificationExternalRef Classification = Classification(MigrationClassification_MIGRATION_CLASSIFICATION_EXTERNAL_REF)
	// ClassificationNonMigratable refuses the object unless it is excluded.
	ClassificationNonMigratable Classification = Classification(MigrationClassification_MIGRATION_CLASSIFICATION_NON_MIGRATABLE)
)

func (Classification) Proto

Proto returns the wire classification value.

type Handler

type Handler interface {
	TypeID() string
	Classification() Classification
	Inspect(context.Context, *ObjectDescriptor) (*Inspection, error)
	Rewrite(context.Context, *ObjectDescriptor, *IdentityMap) (*RewriteResult, error)
}

Handler classifies an ObjectType and owns its typed reference semantics.

type IdentityMap

type IdentityMap struct {
	SpaceIDs            map[string]string
	BlockStoreIDs       map[string]string
	ObjectKeys          map[string]string
	NestedSharedObjects map[string]string
	CanvasNodes         map[string]string
	GraphIRIs           map[string]string
}

IdentityMap contains deterministic mappings for all Space-local identities.

func NewIdentityMap

func NewIdentityMap() *IdentityMap

NewIdentityMap constructs an empty identity map.

func (*IdentityMap) MapGraphIRI

func (m *IdentityMap) MapGraphIRI(value string) string

MapGraphIRI maps an exact Space-local graph IRI and leaves external values unchanged.

func (*IdentityMap) Validate

func (m *IdentityMap) Validate() error

Validate checks that all identity maps are initialized and collision-free.

type Inspection

type Inspection struct {
	Dependencies       []string
	References         []TypedReference
	ExternalReferences []string
}

Inspection is the typed closure and disclosure result from a handler.

type MigrationBlocker

type MigrationBlocker struct {

	// Code is a stable machine-readable blocker code.
	Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	// ObjectType identifies the affected type when applicable.
	ObjectType string `protobuf:"bytes,2,opt,name=object_type,json=objectType,proto3" json:"objectType,omitempty"`
	// ObjectKeys lists all affected keys in sorted order.
	ObjectKeys []string `protobuf:"bytes,3,rep,name=object_keys,json=objectKeys,proto3" json:"objectKeys,omitempty"`
	// Detail is safe, non-secret diagnostic text.
	Detail string `protobuf:"bytes,4,opt,name=detail,proto3" json:"detail,omitempty"`
	// contains filtered or unexported fields
}

MigrationBlocker is a typed reason a preview cannot start.

func (*MigrationBlocker) CloneMessageVT

func (m *MigrationBlocker) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*MigrationBlocker) CloneVT

func (m *MigrationBlocker) CloneVT() *MigrationBlocker

func (*MigrationBlocker) EqualMessageVT

func (this *MigrationBlocker) EqualMessageVT(thatMsg any) bool

func (*MigrationBlocker) EqualVT

func (this *MigrationBlocker) EqualVT(that *MigrationBlocker) bool

func (*MigrationBlocker) GetCode

func (x *MigrationBlocker) GetCode() string

func (*MigrationBlocker) GetDetail

func (x *MigrationBlocker) GetDetail() string

func (*MigrationBlocker) GetObjectKeys

func (x *MigrationBlocker) GetObjectKeys() []string

func (*MigrationBlocker) GetObjectType

func (x *MigrationBlocker) GetObjectType() string

func (*MigrationBlocker) MarshalJSON

func (x *MigrationBlocker) MarshalJSON() ([]byte, error)

MarshalJSON marshals the MigrationBlocker to JSON.

func (*MigrationBlocker) MarshalProtoJSON

func (x *MigrationBlocker) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the MigrationBlocker message to JSON.

func (*MigrationBlocker) MarshalProtoText

func (x *MigrationBlocker) MarshalProtoText() string

func (*MigrationBlocker) MarshalToSizedBufferVT

func (m *MigrationBlocker) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*MigrationBlocker) MarshalToVT

func (m *MigrationBlocker) MarshalToVT(dAtA []byte) (int, error)

func (*MigrationBlocker) MarshalVT

func (m *MigrationBlocker) MarshalVT() (dAtA []byte, err error)

func (*MigrationBlocker) ProtoMessage

func (*MigrationBlocker) ProtoMessage()

func (*MigrationBlocker) Reset

func (x *MigrationBlocker) Reset()

func (*MigrationBlocker) SizeVT

func (m *MigrationBlocker) SizeVT() (n int)

func (*MigrationBlocker) String

func (x *MigrationBlocker) String() string

func (*MigrationBlocker) UnmarshalJSON

func (x *MigrationBlocker) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the MigrationBlocker from JSON.

func (*MigrationBlocker) UnmarshalProtoJSON

func (x *MigrationBlocker) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the MigrationBlocker message from JSON.

func (*MigrationBlocker) UnmarshalVT

func (m *MigrationBlocker) UnmarshalVT(dAtA []byte) error

type MigrationClassification

type MigrationClassification int32

MigrationClassification states how an ObjectType may cross a Space boundary.

const (
	// MIGRATION_CLASSIFICATION_UNCLASSIFIED is a typed safety blocker.
	MigrationClassification_MIGRATION_CLASSIFICATION_UNCLASSIFIED MigrationClassification = 0
	// MIGRATION_CLASSIFICATION_SPACE_LOCAL_OPAQUE has no embedded identity.
	MigrationClassification_MIGRATION_CLASSIFICATION_SPACE_LOCAL_OPAQUE MigrationClassification = 1
	// MIGRATION_CLASSIFICATION_REWRITE requires typed reference rewriting.
	MigrationClassification_MIGRATION_CLASSIFICATION_REWRITE MigrationClassification = 2
	// MIGRATION_CLASSIFICATION_EXTERNAL_REF remains outside the Space.
	MigrationClassification_MIGRATION_CLASSIFICATION_EXTERNAL_REF MigrationClassification = 3
	// MIGRATION_CLASSIFICATION_NON_MIGRATABLE must be refused or excluded.
	MigrationClassification_MIGRATION_CLASSIFICATION_NON_MIGRATABLE MigrationClassification = 4
)

func (MigrationClassification) Enum

func (MigrationClassification) MarshalJSON

func (x MigrationClassification) MarshalJSON() ([]byte, error)

MarshalJSON marshals the MigrationClassification to JSON.

func (MigrationClassification) MarshalProtoJSON

func (x MigrationClassification) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the MigrationClassification to JSON.

func (MigrationClassification) MarshalProtoText

func (x MigrationClassification) MarshalProtoText() string

func (MigrationClassification) MarshalText

func (x MigrationClassification) MarshalText() ([]byte, error)

MarshalText marshals the MigrationClassification to text.

func (MigrationClassification) String

func (x MigrationClassification) String() string

func (*MigrationClassification) UnmarshalJSON

func (x *MigrationClassification) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the MigrationClassification from JSON.

func (*MigrationClassification) UnmarshalProtoJSON

func (x *MigrationClassification) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the MigrationClassification from JSON.

func (*MigrationClassification) UnmarshalText

func (x *MigrationClassification) UnmarshalText(b []byte) error

UnmarshalText unmarshals the MigrationClassification from text.

type MigrationCleanupEntry

type MigrationCleanupEntry struct {
	ObjectKey      string `protobuf:"bytes,1,opt,name=object_key,json=objectKey,proto3" json:"objectKey,omitempty"`
	SourceRevision uint64 `protobuf:"varint,2,opt,name=source_revision,json=sourceRevision,proto3" json:"sourceRevision,omitempty"`
	State          string `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"`
	// contains filtered or unexported fields
}

MigrationCleanupEntry records one source object cleanup precondition.

func (*MigrationCleanupEntry) CloneMessageVT

func (*MigrationCleanupEntry) CloneVT

func (*MigrationCleanupEntry) EqualMessageVT

func (this *MigrationCleanupEntry) EqualMessageVT(thatMsg any) bool

func (*MigrationCleanupEntry) EqualVT

func (this *MigrationCleanupEntry) EqualVT(that *MigrationCleanupEntry) bool

func (*MigrationCleanupEntry) GetObjectKey

func (x *MigrationCleanupEntry) GetObjectKey() string

func (*MigrationCleanupEntry) GetSourceRevision

func (x *MigrationCleanupEntry) GetSourceRevision() uint64

func (*MigrationCleanupEntry) GetState

func (x *MigrationCleanupEntry) GetState() string

func (*MigrationCleanupEntry) MarshalJSON

func (x *MigrationCleanupEntry) MarshalJSON() ([]byte, error)

MarshalJSON marshals the MigrationCleanupEntry to JSON.

func (*MigrationCleanupEntry) MarshalProtoJSON

func (x *MigrationCleanupEntry) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the MigrationCleanupEntry message to JSON.

func (*MigrationCleanupEntry) MarshalProtoText

func (x *MigrationCleanupEntry) MarshalProtoText() string

func (*MigrationCleanupEntry) MarshalToSizedBufferVT

func (m *MigrationCleanupEntry) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*MigrationCleanupEntry) MarshalToVT

func (m *MigrationCleanupEntry) MarshalToVT(dAtA []byte) (int, error)

func (*MigrationCleanupEntry) MarshalVT

func (m *MigrationCleanupEntry) MarshalVT() (dAtA []byte, err error)

func (*MigrationCleanupEntry) ProtoMessage

func (*MigrationCleanupEntry) ProtoMessage()

func (*MigrationCleanupEntry) Reset

func (x *MigrationCleanupEntry) Reset()

func (*MigrationCleanupEntry) SizeVT

func (m *MigrationCleanupEntry) SizeVT() (n int)

func (*MigrationCleanupEntry) String

func (x *MigrationCleanupEntry) String() string

func (*MigrationCleanupEntry) UnmarshalJSON

func (x *MigrationCleanupEntry) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the MigrationCleanupEntry from JSON.

func (*MigrationCleanupEntry) UnmarshalProtoJSON

func (x *MigrationCleanupEntry) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the MigrationCleanupEntry message from JSON.

func (*MigrationCleanupEntry) UnmarshalVT

func (m *MigrationCleanupEntry) UnmarshalVT(dAtA []byte) error

type MigrationConflict

type MigrationConflict struct {

	// Kind identifies the conflict category.
	Kind MigrationConflictKind `protobuf:"varint,1,opt,name=kind,proto3" json:"kind,omitempty"`
	// ObjectKey identifies the affected source object.
	ObjectKey string `protobuf:"bytes,2,opt,name=object_key,json=objectKey,proto3" json:"objectKey,omitempty"`
	// ObjectType identifies the affected ObjectType.
	ObjectType string `protobuf:"bytes,3,opt,name=object_type,json=objectType,proto3" json:"objectType,omitempty"`
	// SuggestedKey is the deterministic default for key collisions.
	SuggestedKey string `protobuf:"bytes,4,opt,name=suggested_key,json=suggestedKey,proto3" json:"suggestedKey,omitempty"`
	// Detail is safe, non-secret diagnostic text.
	Detail string `protobuf:"bytes,5,opt,name=detail,proto3" json:"detail,omitempty"`
	// Resolution records the explicit typed choice, when one was supplied.
	Resolution MigrationConflictResolution `protobuf:"varint,6,opt,name=resolution,proto3" json:"resolution,omitempty"`
	// ResolutionRequired blocks execution until a choice is supplied.
	ResolutionRequired bool `protobuf:"varint,7,opt,name=resolution_required,json=resolutionRequired,proto3" json:"resolutionRequired,omitempty"`
	// contains filtered or unexported fields
}

MigrationConflict describes a deterministic collision or external disclosure.

func (*MigrationConflict) CloneMessageVT

func (m *MigrationConflict) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*MigrationConflict) CloneVT

func (m *MigrationConflict) CloneVT() *MigrationConflict

func (*MigrationConflict) EqualMessageVT

func (this *MigrationConflict) EqualMessageVT(thatMsg any) bool

func (*MigrationConflict) EqualVT

func (this *MigrationConflict) EqualVT(that *MigrationConflict) bool

func (*MigrationConflict) GetDetail

func (x *MigrationConflict) GetDetail() string

func (*MigrationConflict) GetKind

func (*MigrationConflict) GetObjectKey

func (x *MigrationConflict) GetObjectKey() string

func (*MigrationConflict) GetObjectType

func (x *MigrationConflict) GetObjectType() string

func (*MigrationConflict) GetResolution

func (*MigrationConflict) GetResolutionRequired

func (x *MigrationConflict) GetResolutionRequired() bool

func (*MigrationConflict) GetSuggestedKey

func (x *MigrationConflict) GetSuggestedKey() string

func (*MigrationConflict) MarshalJSON

func (x *MigrationConflict) MarshalJSON() ([]byte, error)

MarshalJSON marshals the MigrationConflict to JSON.

func (*MigrationConflict) MarshalProtoJSON

func (x *MigrationConflict) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the MigrationConflict message to JSON.

func (*MigrationConflict) MarshalProtoText

func (x *MigrationConflict) MarshalProtoText() string

func (*MigrationConflict) MarshalToSizedBufferVT

func (m *MigrationConflict) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*MigrationConflict) MarshalToVT

func (m *MigrationConflict) MarshalToVT(dAtA []byte) (int, error)

func (*MigrationConflict) MarshalVT

func (m *MigrationConflict) MarshalVT() (dAtA []byte, err error)

func (*MigrationConflict) ProtoMessage

func (*MigrationConflict) ProtoMessage()

func (*MigrationConflict) Reset

func (x *MigrationConflict) Reset()

func (*MigrationConflict) SizeVT

func (m *MigrationConflict) SizeVT() (n int)

func (*MigrationConflict) String

func (x *MigrationConflict) String() string

func (*MigrationConflict) UnmarshalJSON

func (x *MigrationConflict) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the MigrationConflict from JSON.

func (*MigrationConflict) UnmarshalProtoJSON

func (x *MigrationConflict) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the MigrationConflict message from JSON.

func (*MigrationConflict) UnmarshalVT

func (m *MigrationConflict) UnmarshalVT(dAtA []byte) error

type MigrationConflictKind

type MigrationConflictKind int32

MigrationConflictKind identifies a preview conflict or disclosure.

const (
	// MIGRATION_CONFLICT_KIND_UNSPECIFIED is the zero value.
	MigrationConflictKind_MIGRATION_CONFLICT_KIND_UNSPECIFIED MigrationConflictKind = 0
	// MIGRATION_CONFLICT_KIND_OBJECT_KEY is an object-key collision.
	MigrationConflictKind_MIGRATION_CONFLICT_KIND_OBJECT_KEY MigrationConflictKind = 1
	// MIGRATION_CONFLICT_KIND_EXTERNAL_REFERENCE discloses an external reference.
	MigrationConflictKind_MIGRATION_CONFLICT_KIND_EXTERNAL_REFERENCE MigrationConflictKind = 2
	// MIGRATION_CONFLICT_KIND_NON_MIGRATABLE identifies refused state.
	MigrationConflictKind_MIGRATION_CONFLICT_KIND_NON_MIGRATABLE MigrationConflictKind = 3
)

func (MigrationConflictKind) Enum

func (MigrationConflictKind) MarshalJSON

func (x MigrationConflictKind) MarshalJSON() ([]byte, error)

MarshalJSON marshals the MigrationConflictKind to JSON.

func (MigrationConflictKind) MarshalProtoJSON

func (x MigrationConflictKind) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the MigrationConflictKind to JSON.

func (MigrationConflictKind) MarshalProtoText

func (x MigrationConflictKind) MarshalProtoText() string

func (MigrationConflictKind) MarshalText

func (x MigrationConflictKind) MarshalText() ([]byte, error)

MarshalText marshals the MigrationConflictKind to text.

func (MigrationConflictKind) String

func (x MigrationConflictKind) String() string

func (*MigrationConflictKind) UnmarshalJSON

func (x *MigrationConflictKind) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the MigrationConflictKind from JSON.

func (*MigrationConflictKind) UnmarshalProtoJSON

func (x *MigrationConflictKind) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the MigrationConflictKind from JSON.

func (*MigrationConflictKind) UnmarshalText

func (x *MigrationConflictKind) UnmarshalText(b []byte) error

UnmarshalText unmarshals the MigrationConflictKind from text.

type MigrationConflictResolution

type MigrationConflictResolution int32

MigrationConflictResolution is the explicit user choice for a collision.

const (
	MigrationConflictResolution_MIGRATION_CONFLICT_RESOLUTION_UNSPECIFIED      MigrationConflictResolution = 0
	MigrationConflictResolution_MIGRATION_CONFLICT_RESOLUTION_DEDUPLICATE      MigrationConflictResolution = 1
	MigrationConflictResolution_MIGRATION_CONFLICT_RESOLUTION_RENAME           MigrationConflictResolution = 2
	MigrationConflictResolution_MIGRATION_CONFLICT_RESOLUTION_KEEP_DESTINATION MigrationConflictResolution = 3
	MigrationConflictResolution_MIGRATION_CONFLICT_RESOLUTION_REPLACE          MigrationConflictResolution = 4
	MigrationConflictResolution_MIGRATION_CONFLICT_RESOLUTION_COMBINE          MigrationConflictResolution = 5
)

func (MigrationConflictResolution) Enum

func (MigrationConflictResolution) MarshalJSON

func (x MigrationConflictResolution) MarshalJSON() ([]byte, error)

MarshalJSON marshals the MigrationConflictResolution to JSON.

func (MigrationConflictResolution) MarshalProtoJSON

func (x MigrationConflictResolution) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the MigrationConflictResolution to JSON.

func (MigrationConflictResolution) MarshalProtoText

func (x MigrationConflictResolution) MarshalProtoText() string

func (MigrationConflictResolution) MarshalText

func (x MigrationConflictResolution) MarshalText() ([]byte, error)

MarshalText marshals the MigrationConflictResolution to text.

func (MigrationConflictResolution) String

func (*MigrationConflictResolution) UnmarshalJSON

func (x *MigrationConflictResolution) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the MigrationConflictResolution from JSON.

func (*MigrationConflictResolution) UnmarshalProtoJSON

func (x *MigrationConflictResolution) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the MigrationConflictResolution from JSON.

func (*MigrationConflictResolution) UnmarshalText

func (x *MigrationConflictResolution) UnmarshalText(b []byte) error

UnmarshalText unmarshals the MigrationConflictResolution from text.

type MigrationIdentityMapping

type MigrationIdentityMapping struct {

	// Kind identifies the identity domain.
	Kind MigrationReferenceKind `protobuf:"varint,1,opt,name=kind,proto3" json:"kind,omitempty"`
	// Source is the source identity.
	Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"`
	// Destination is the deterministic destination identity.
	Destination string `protobuf:"bytes,3,opt,name=destination,proto3" json:"destination,omitempty"`
	// contains filtered or unexported fields
}

MigrationIdentityMapping maps one typed source identity to a destination.

func (*MigrationIdentityMapping) CloneMessageVT

func (*MigrationIdentityMapping) CloneVT

func (*MigrationIdentityMapping) EqualMessageVT

func (this *MigrationIdentityMapping) EqualMessageVT(thatMsg any) bool

func (*MigrationIdentityMapping) EqualVT

func (*MigrationIdentityMapping) GetDestination

func (x *MigrationIdentityMapping) GetDestination() string

func (*MigrationIdentityMapping) GetKind

func (*MigrationIdentityMapping) GetSource

func (x *MigrationIdentityMapping) GetSource() string

func (*MigrationIdentityMapping) MarshalJSON

func (x *MigrationIdentityMapping) MarshalJSON() ([]byte, error)

MarshalJSON marshals the MigrationIdentityMapping to JSON.

func (*MigrationIdentityMapping) MarshalProtoJSON

func (x *MigrationIdentityMapping) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the MigrationIdentityMapping message to JSON.

func (*MigrationIdentityMapping) MarshalProtoText

func (x *MigrationIdentityMapping) MarshalProtoText() string

func (*MigrationIdentityMapping) MarshalToSizedBufferVT

func (m *MigrationIdentityMapping) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*MigrationIdentityMapping) MarshalToVT

func (m *MigrationIdentityMapping) MarshalToVT(dAtA []byte) (int, error)

func (*MigrationIdentityMapping) MarshalVT

func (m *MigrationIdentityMapping) MarshalVT() (dAtA []byte, err error)

func (*MigrationIdentityMapping) ProtoMessage

func (*MigrationIdentityMapping) ProtoMessage()

func (*MigrationIdentityMapping) Reset

func (x *MigrationIdentityMapping) Reset()

func (*MigrationIdentityMapping) SizeVT

func (m *MigrationIdentityMapping) SizeVT() (n int)

func (*MigrationIdentityMapping) String

func (x *MigrationIdentityMapping) String() string

func (*MigrationIdentityMapping) UnmarshalJSON

func (x *MigrationIdentityMapping) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the MigrationIdentityMapping from JSON.

func (*MigrationIdentityMapping) UnmarshalProtoJSON

func (x *MigrationIdentityMapping) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the MigrationIdentityMapping message from JSON.

func (*MigrationIdentityMapping) UnmarshalVT

func (m *MigrationIdentityMapping) UnmarshalVT(dAtA []byte) error

type MigrationJournal

type MigrationJournal struct {

	// OperationId identifies the operation.
	OperationId string `protobuf:"bytes,1,opt,name=operation_id,json=operationId,proto3" json:"operationId,omitempty"`
	// PreviewDigest binds execution to one immutable preview.
	PreviewDigest string `protobuf:"bytes,2,opt,name=preview_digest,json=previewDigest,proto3" json:"previewDigest,omitempty"`
	// SourceSpaceId identifies the source namespace.
	SourceSpaceId string `protobuf:"bytes,3,opt,name=source_space_id,json=sourceSpaceId,proto3" json:"sourceSpaceId,omitempty"`
	// DestinationSpaceId identifies the destination namespace.
	DestinationSpaceId string `protobuf:"bytes,4,opt,name=destination_space_id,json=destinationSpaceId,proto3" json:"destinationSpaceId,omitempty"`
	// Progress is the latest owner-reported progress.
	Progress *MigrationProgress `protobuf:"bytes,5,opt,name=progress,proto3" json:"progress,omitempty"`
	// Terminal is the latest typed terminal result.
	Terminal *MigrationTerminalResult `protobuf:"bytes,6,opt,name=terminal,proto3" json:"terminal,omitempty"`
	// SourceRevision and DestinationRevision are execution preconditions.
	SourceRevision          uint64                      `protobuf:"varint,7,opt,name=source_revision,json=sourceRevision,proto3" json:"sourceRevision,omitempty"`
	DestinationRevision     uint64                      `protobuf:"varint,8,opt,name=destination_revision,json=destinationRevision,proto3" json:"destinationRevision,omitempty"`
	SourceBlockStoreId      string                      `protobuf:"bytes,9,opt,name=source_block_store_id,json=sourceBlockStoreId,proto3" json:"sourceBlockStoreId,omitempty"`
	DestinationBlockStoreId string                      `` /* 132-byte string literal not displayed */
	IdentityMappings        []*MigrationIdentityMapping `protobuf:"bytes,11,rep,name=identity_mappings,json=identityMappings,proto3" json:"identityMappings,omitempty"`
	CompletedStagingUnits   []*MigrationStagingUnit     `protobuf:"bytes,12,rep,name=completed_staging_units,json=completedStagingUnits,proto3" json:"completedStagingUnits,omitempty"`
	DestinationBeforeRoot   string                      `protobuf:"bytes,13,opt,name=destination_before_root,json=destinationBeforeRoot,proto3" json:"destinationBeforeRoot,omitempty"`
	DestinationAfterRoot    string                      `protobuf:"bytes,14,opt,name=destination_after_root,json=destinationAfterRoot,proto3" json:"destinationAfterRoot,omitempty"`
	SourceCleanupLedger     []*MigrationCleanupEntry    `protobuf:"bytes,15,rep,name=source_cleanup_ledger,json=sourceCleanupLedger,proto3" json:"sourceCleanupLedger,omitempty"`
	Phase                   string                      `protobuf:"bytes,16,opt,name=phase,proto3" json:"phase,omitempty"`
	// Preview is the complete secret-free precondition and closure snapshot.
	Preview                   *MigrationPreview `protobuf:"bytes,18,opt,name=preview,proto3" json:"preview,omitempty"`
	RetentionUntilUnixSeconds uint64            `` /* 139-byte string literal not displayed */
	// contains filtered or unexported fields
}

MigrationJournal is the durable, secret-free operation record shape.

func NewMigrationJournal

func NewMigrationJournal(operationID string, preview *MigrationPreview, retentionUntilUnixSeconds uint64) (*MigrationJournal, error)

NewMigrationJournal snapshots a complete immutable preview for durable migration progress. Callers may persist the returned protobuf bytes; the journal owns a deep clone and never aliases the planner's preview.

func (*MigrationJournal) CloneMessageVT

func (m *MigrationJournal) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*MigrationJournal) CloneVT

func (m *MigrationJournal) CloneVT() *MigrationJournal

func (*MigrationJournal) EqualMessageVT

func (this *MigrationJournal) EqualMessageVT(thatMsg any) bool

func (*MigrationJournal) EqualVT

func (this *MigrationJournal) EqualVT(that *MigrationJournal) bool

func (*MigrationJournal) GetCompletedStagingUnits

func (x *MigrationJournal) GetCompletedStagingUnits() []*MigrationStagingUnit

func (*MigrationJournal) GetDestinationAfterRoot

func (x *MigrationJournal) GetDestinationAfterRoot() string

func (*MigrationJournal) GetDestinationBeforeRoot

func (x *MigrationJournal) GetDestinationBeforeRoot() string

func (*MigrationJournal) GetDestinationBlockStoreId

func (x *MigrationJournal) GetDestinationBlockStoreId() string

func (*MigrationJournal) GetDestinationRevision

func (x *MigrationJournal) GetDestinationRevision() uint64

func (*MigrationJournal) GetDestinationSpaceId

func (x *MigrationJournal) GetDestinationSpaceId() string

func (*MigrationJournal) GetIdentityMappings

func (x *MigrationJournal) GetIdentityMappings() []*MigrationIdentityMapping

func (*MigrationJournal) GetOperationId

func (x *MigrationJournal) GetOperationId() string

func (*MigrationJournal) GetPhase

func (x *MigrationJournal) GetPhase() string

func (*MigrationJournal) GetPreview

func (x *MigrationJournal) GetPreview() *MigrationPreview

func (*MigrationJournal) GetPreviewDigest

func (x *MigrationJournal) GetPreviewDigest() string

func (*MigrationJournal) GetProgress

func (x *MigrationJournal) GetProgress() *MigrationProgress

func (*MigrationJournal) GetRetentionUntilUnixSeconds

func (x *MigrationJournal) GetRetentionUntilUnixSeconds() uint64

func (*MigrationJournal) GetSourceBlockStoreId

func (x *MigrationJournal) GetSourceBlockStoreId() string

func (*MigrationJournal) GetSourceCleanupLedger

func (x *MigrationJournal) GetSourceCleanupLedger() []*MigrationCleanupEntry

func (*MigrationJournal) GetSourceRevision

func (x *MigrationJournal) GetSourceRevision() uint64

func (*MigrationJournal) GetSourceSpaceId

func (x *MigrationJournal) GetSourceSpaceId() string

func (*MigrationJournal) GetTerminal

func (x *MigrationJournal) GetTerminal() *MigrationTerminalResult

func (*MigrationJournal) MarshalJSON

func (x *MigrationJournal) MarshalJSON() ([]byte, error)

MarshalJSON marshals the MigrationJournal to JSON.

func (*MigrationJournal) MarshalProtoJSON

func (x *MigrationJournal) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the MigrationJournal message to JSON.

func (*MigrationJournal) MarshalProtoText

func (x *MigrationJournal) MarshalProtoText() string

func (*MigrationJournal) MarshalToSizedBufferVT

func (m *MigrationJournal) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*MigrationJournal) MarshalToVT

func (m *MigrationJournal) MarshalToVT(dAtA []byte) (int, error)

func (*MigrationJournal) MarshalVT

func (m *MigrationJournal) MarshalVT() (dAtA []byte, err error)

func (*MigrationJournal) ProtoMessage

func (*MigrationJournal) ProtoMessage()

func (*MigrationJournal) Reset

func (x *MigrationJournal) Reset()

func (*MigrationJournal) SizeVT

func (m *MigrationJournal) SizeVT() (n int)

func (*MigrationJournal) String

func (x *MigrationJournal) String() string

func (*MigrationJournal) UnmarshalJSON

func (x *MigrationJournal) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the MigrationJournal from JSON.

func (*MigrationJournal) UnmarshalProtoJSON

func (x *MigrationJournal) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the MigrationJournal message from JSON.

func (*MigrationJournal) UnmarshalVT

func (m *MigrationJournal) UnmarshalVT(dAtA []byte) error

type MigrationObject

type MigrationObject struct {

	// ObjectKey is the source Space-local key.
	ObjectKey string `protobuf:"bytes,1,opt,name=object_key,json=objectKey,proto3" json:"objectKey,omitempty"`
	// ObjectType is the registered ObjectType identifier.
	ObjectType string `protobuf:"bytes,2,opt,name=object_type,json=objectType,proto3" json:"objectType,omitempty"`
	// Revision is the source object revision at preview.
	Revision uint64 `protobuf:"varint,3,opt,name=revision,proto3" json:"revision,omitempty"`
	// RootDigest identifies the immutable object root without exposing payload.
	RootDigest string `protobuf:"bytes,4,opt,name=root_digest,json=rootDigest,proto3" json:"rootDigest,omitempty"`
	// LogicalBytes is the estimated logical size for capacity preflight.
	LogicalBytes uint64 `protobuf:"varint,5,opt,name=logical_bytes,json=logicalBytes,proto3" json:"logicalBytes,omitempty"`
	// contains filtered or unexported fields
}

MigrationObject describes one source object without carrying its payload.

func (*MigrationObject) CloneMessageVT

func (m *MigrationObject) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*MigrationObject) CloneVT

func (m *MigrationObject) CloneVT() *MigrationObject

func (*MigrationObject) EqualMessageVT

func (this *MigrationObject) EqualMessageVT(thatMsg any) bool

func (*MigrationObject) EqualVT

func (this *MigrationObject) EqualVT(that *MigrationObject) bool

func (*MigrationObject) GetLogicalBytes

func (x *MigrationObject) GetLogicalBytes() uint64

func (*MigrationObject) GetObjectKey

func (x *MigrationObject) GetObjectKey() string

func (*MigrationObject) GetObjectType

func (x *MigrationObject) GetObjectType() string

func (*MigrationObject) GetRevision

func (x *MigrationObject) GetRevision() uint64

func (*MigrationObject) GetRootDigest

func (x *MigrationObject) GetRootDigest() string

func (*MigrationObject) MarshalJSON

func (x *MigrationObject) MarshalJSON() ([]byte, error)

MarshalJSON marshals the MigrationObject to JSON.

func (*MigrationObject) MarshalProtoJSON

func (x *MigrationObject) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the MigrationObject message to JSON.

func (*MigrationObject) MarshalProtoText

func (x *MigrationObject) MarshalProtoText() string

func (*MigrationObject) MarshalToSizedBufferVT

func (m *MigrationObject) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*MigrationObject) MarshalToVT

func (m *MigrationObject) MarshalToVT(dAtA []byte) (int, error)

func (*MigrationObject) MarshalVT

func (m *MigrationObject) MarshalVT() (dAtA []byte, err error)

func (*MigrationObject) ProtoMessage

func (*MigrationObject) ProtoMessage()

func (*MigrationObject) Reset

func (x *MigrationObject) Reset()

func (*MigrationObject) SizeVT

func (m *MigrationObject) SizeVT() (n int)

func (*MigrationObject) String

func (x *MigrationObject) String() string

func (*MigrationObject) UnmarshalJSON

func (x *MigrationObject) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the MigrationObject from JSON.

func (*MigrationObject) UnmarshalProtoJSON

func (x *MigrationObject) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the MigrationObject message from JSON.

func (*MigrationObject) UnmarshalVT

func (m *MigrationObject) UnmarshalVT(dAtA []byte) error

type MigrationOperation

type MigrationOperation int32

MigrationOperation identifies a read-only migration plan operation.

const (
	// MIGRATION_OPERATION_UNSPECIFIED is the zero value.
	MigrationOperation_MIGRATION_OPERATION_UNSPECIFIED MigrationOperation = 0
	// MIGRATION_OPERATION_COPY copies a Space into a destination namespace.
	MigrationOperation_MIGRATION_OPERATION_COPY MigrationOperation = 1
	// MIGRATION_OPERATION_MERGE merges objects into an existing destination.
	MigrationOperation_MIGRATION_OPERATION_MERGE MigrationOperation = 2
	// MIGRATION_OPERATION_COPY_OBJECTS copies a selected closure.
	MigrationOperation_MIGRATION_OPERATION_COPY_OBJECTS MigrationOperation = 3
	// MIGRATION_OPERATION_MOVE_OBJECTS moves a selected closure after commit.
	MigrationOperation_MIGRATION_OPERATION_MOVE_OBJECTS MigrationOperation = 4
	// MIGRATION_OPERATION_SPLIT copies a selected closure into a new Space.
	MigrationOperation_MIGRATION_OPERATION_SPLIT MigrationOperation = 5
)

func (MigrationOperation) Enum

func (MigrationOperation) MarshalJSON

func (x MigrationOperation) MarshalJSON() ([]byte, error)

MarshalJSON marshals the MigrationOperation to JSON.

func (MigrationOperation) MarshalProtoJSON

func (x MigrationOperation) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the MigrationOperation to JSON.

func (MigrationOperation) MarshalProtoText

func (x MigrationOperation) MarshalProtoText() string

func (MigrationOperation) MarshalText

func (x MigrationOperation) MarshalText() ([]byte, error)

MarshalText marshals the MigrationOperation to text.

func (MigrationOperation) String

func (x MigrationOperation) String() string

func (*MigrationOperation) UnmarshalJSON

func (x *MigrationOperation) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the MigrationOperation from JSON.

func (*MigrationOperation) UnmarshalProtoJSON

func (x *MigrationOperation) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the MigrationOperation from JSON.

func (*MigrationOperation) UnmarshalText

func (x *MigrationOperation) UnmarshalText(b []byte) error

UnmarshalText unmarshals the MigrationOperation from text.

type MigrationPreview

type MigrationPreview struct {

	// Operation identifies the requested operation.
	Operation MigrationOperation `protobuf:"varint,1,opt,name=operation,proto3" json:"operation,omitempty"`
	// SourceSpaceId identifies the source namespace.
	SourceSpaceId string `protobuf:"bytes,2,opt,name=source_space_id,json=sourceSpaceId,proto3" json:"sourceSpaceId,omitempty"`
	// DestinationSpaceId identifies the destination namespace.
	DestinationSpaceId string `protobuf:"bytes,3,opt,name=destination_space_id,json=destinationSpaceId,proto3" json:"destinationSpaceId,omitempty"`
	// SourceRevision is the source World sequence at preview.
	SourceRevision uint64 `protobuf:"varint,4,opt,name=source_revision,json=sourceRevision,proto3" json:"sourceRevision,omitempty"`
	// DestinationRevision is the destination World sequence at preview.
	DestinationRevision uint64 `protobuf:"varint,5,opt,name=destination_revision,json=destinationRevision,proto3" json:"destinationRevision,omitempty"`
	// Objects is the sorted dependency closure.
	Objects []*MigrationObject `protobuf:"bytes,6,rep,name=objects,proto3" json:"objects,omitempty"`
	// IdentityMappings is sorted by kind then source.
	IdentityMappings []*MigrationIdentityMapping `protobuf:"bytes,7,rep,name=identity_mappings,json=identityMappings,proto3" json:"identityMappings,omitempty"`
	// Conflicts is sorted by object key and kind.
	Conflicts []*MigrationConflict `protobuf:"bytes,8,rep,name=conflicts,proto3" json:"conflicts,omitempty"`
	// Blockers is sorted by code, type, then object key.
	Blockers []*MigrationBlocker `protobuf:"bytes,9,rep,name=blockers,proto3" json:"blockers,omitempty"`
	// Progress is the read-only estimate for this preview.
	Progress *MigrationProgress `protobuf:"bytes,10,opt,name=progress,proto3" json:"progress,omitempty"`
	// Result is the typed preview result.
	Result *MigrationTerminalResult `protobuf:"bytes,11,opt,name=result,proto3" json:"result,omitempty"`
	// Digest is the stable digest of all fields except Digest itself.
	Digest string `protobuf:"bytes,12,opt,name=digest,proto3" json:"digest,omitempty"`
	// DestinationCapacity is the capacity supplied to preflight.
	DestinationCapacity uint64 `protobuf:"varint,13,opt,name=destination_capacity,json=destinationCapacity,proto3" json:"destinationCapacity,omitempty"`
	// CapacityKnown indicates whether capacity was supplied.
	CapacityKnown bool `protobuf:"varint,14,opt,name=capacity_known,json=capacityKnown,proto3" json:"capacityKnown,omitempty"`
	// contains filtered or unexported fields
}

MigrationPreview is an immutable, read-only migration plan.

func (*MigrationPreview) CloneMessageVT

func (m *MigrationPreview) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*MigrationPreview) CloneVT

func (m *MigrationPreview) CloneVT() *MigrationPreview

func (*MigrationPreview) EqualMessageVT

func (this *MigrationPreview) EqualMessageVT(thatMsg any) bool

func (*MigrationPreview) EqualVT

func (this *MigrationPreview) EqualVT(that *MigrationPreview) bool

func (*MigrationPreview) GetBlockers

func (x *MigrationPreview) GetBlockers() []*MigrationBlocker

func (*MigrationPreview) GetCapacityKnown

func (x *MigrationPreview) GetCapacityKnown() bool

func (*MigrationPreview) GetConflicts

func (x *MigrationPreview) GetConflicts() []*MigrationConflict

func (*MigrationPreview) GetDestinationCapacity

func (x *MigrationPreview) GetDestinationCapacity() uint64

func (*MigrationPreview) GetDestinationRevision

func (x *MigrationPreview) GetDestinationRevision() uint64

func (*MigrationPreview) GetDestinationSpaceId

func (x *MigrationPreview) GetDestinationSpaceId() string

func (*MigrationPreview) GetDigest

func (x *MigrationPreview) GetDigest() string

func (*MigrationPreview) GetIdentityMappings

func (x *MigrationPreview) GetIdentityMappings() []*MigrationIdentityMapping

func (*MigrationPreview) GetObjects

func (x *MigrationPreview) GetObjects() []*MigrationObject

func (*MigrationPreview) GetOperation

func (x *MigrationPreview) GetOperation() MigrationOperation

func (*MigrationPreview) GetProgress

func (x *MigrationPreview) GetProgress() *MigrationProgress

func (*MigrationPreview) GetResult

func (x *MigrationPreview) GetResult() *MigrationTerminalResult

func (*MigrationPreview) GetSourceRevision

func (x *MigrationPreview) GetSourceRevision() uint64

func (*MigrationPreview) GetSourceSpaceId

func (x *MigrationPreview) GetSourceSpaceId() string

func (*MigrationPreview) MarshalJSON

func (x *MigrationPreview) MarshalJSON() ([]byte, error)

MarshalJSON marshals the MigrationPreview to JSON.

func (*MigrationPreview) MarshalProtoJSON

func (x *MigrationPreview) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the MigrationPreview message to JSON.

func (*MigrationPreview) MarshalProtoText

func (x *MigrationPreview) MarshalProtoText() string

func (*MigrationPreview) MarshalToSizedBufferVT

func (m *MigrationPreview) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*MigrationPreview) MarshalToVT

func (m *MigrationPreview) MarshalToVT(dAtA []byte) (int, error)

func (*MigrationPreview) MarshalVT

func (m *MigrationPreview) MarshalVT() (dAtA []byte, err error)

func (*MigrationPreview) ProtoMessage

func (*MigrationPreview) ProtoMessage()

func (*MigrationPreview) Reset

func (x *MigrationPreview) Reset()

func (*MigrationPreview) SizeVT

func (m *MigrationPreview) SizeVT() (n int)

func (*MigrationPreview) String

func (x *MigrationPreview) String() string

func (*MigrationPreview) UnmarshalJSON

func (x *MigrationPreview) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the MigrationPreview from JSON.

func (*MigrationPreview) UnmarshalProtoJSON

func (x *MigrationPreview) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the MigrationPreview message from JSON.

func (*MigrationPreview) UnmarshalVT

func (m *MigrationPreview) UnmarshalVT(dAtA []byte) error

type MigrationProgress

type MigrationProgress struct {

	// ObjectsSeen is the number of source objects scanned.
	ObjectsSeen uint64 `protobuf:"varint,1,opt,name=objects_seen,json=objectsSeen,proto3" json:"objectsSeen,omitempty"`
	// ObjectsPlanned is the number of objects in the dependency closure.
	ObjectsPlanned uint64 `protobuf:"varint,2,opt,name=objects_planned,json=objectsPlanned,proto3" json:"objectsPlanned,omitempty"`
	// LogicalBytes is the estimated logical byte total.
	LogicalBytes uint64 `protobuf:"varint,3,opt,name=logical_bytes,json=logicalBytes,proto3" json:"logicalBytes,omitempty"`
	// BlocksSeen is reserved for execution counters.
	BlocksSeen uint64 `protobuf:"varint,4,opt,name=blocks_seen,json=blocksSeen,proto3" json:"blocksSeen,omitempty"`
	// BlocksCopied is reserved for execution counters.
	BlocksCopied uint64 `protobuf:"varint,5,opt,name=blocks_copied,json=blocksCopied,proto3" json:"blocksCopied,omitempty"`
	// BlocksExisting is reserved for execution counters.
	BlocksExisting uint64 `protobuf:"varint,6,opt,name=blocks_existing,json=blocksExisting,proto3" json:"blocksExisting,omitempty"`
	// BlocksDeduplicated is reserved for execution counters.
	BlocksDeduplicated uint64 `protobuf:"varint,7,opt,name=blocks_deduplicated,json=blocksDeduplicated,proto3" json:"blocksDeduplicated,omitempty"`
	// BlocksWritten counts newly written blocks.
	BlocksWritten uint64 `protobuf:"varint,8,opt,name=blocks_written,json=blocksWritten,proto3" json:"blocksWritten,omitempty"`
	// SubtreesSkipped counts content subtrees skipped by deduplication.
	SubtreesSkipped uint64 `protobuf:"varint,9,opt,name=subtrees_skipped,json=subtreesSkipped,proto3" json:"subtreesSkipped,omitempty"`
	// DestinationBytesWritten counts bytes durably written at destination.
	DestinationBytesWritten uint64 `` /* 132-byte string literal not displayed */
	// NestedSharedObjectsPlanned counts nested Secret envelopes planned.
	NestedSharedObjectsPlanned uint64 `` /* 142-byte string literal not displayed */
	// NestedSharedObjectsCompleted counts nested Secret envelopes completed.
	NestedSharedObjectsCompleted uint64 `` /* 148-byte string literal not displayed */
	// contains filtered or unexported fields
}

MigrationProgress carries counters owned by the migration operation.

func (*MigrationProgress) CloneMessageVT

func (m *MigrationProgress) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*MigrationProgress) CloneVT

func (m *MigrationProgress) CloneVT() *MigrationProgress

func (*MigrationProgress) EqualMessageVT

func (this *MigrationProgress) EqualMessageVT(thatMsg any) bool

func (*MigrationProgress) EqualVT

func (this *MigrationProgress) EqualVT(that *MigrationProgress) bool

func (*MigrationProgress) GetBlocksCopied

func (x *MigrationProgress) GetBlocksCopied() uint64

func (*MigrationProgress) GetBlocksDeduplicated

func (x *MigrationProgress) GetBlocksDeduplicated() uint64

func (*MigrationProgress) GetBlocksExisting

func (x *MigrationProgress) GetBlocksExisting() uint64

func (*MigrationProgress) GetBlocksSeen

func (x *MigrationProgress) GetBlocksSeen() uint64

func (*MigrationProgress) GetBlocksWritten

func (x *MigrationProgress) GetBlocksWritten() uint64

func (*MigrationProgress) GetDestinationBytesWritten

func (x *MigrationProgress) GetDestinationBytesWritten() uint64

func (*MigrationProgress) GetLogicalBytes

func (x *MigrationProgress) GetLogicalBytes() uint64

func (*MigrationProgress) GetNestedSharedObjectsCompleted

func (x *MigrationProgress) GetNestedSharedObjectsCompleted() uint64

func (*MigrationProgress) GetNestedSharedObjectsPlanned

func (x *MigrationProgress) GetNestedSharedObjectsPlanned() uint64

func (*MigrationProgress) GetObjectsPlanned

func (x *MigrationProgress) GetObjectsPlanned() uint64

func (*MigrationProgress) GetObjectsSeen

func (x *MigrationProgress) GetObjectsSeen() uint64

func (*MigrationProgress) GetSubtreesSkipped

func (x *MigrationProgress) GetSubtreesSkipped() uint64

func (*MigrationProgress) MarshalJSON

func (x *MigrationProgress) MarshalJSON() ([]byte, error)

MarshalJSON marshals the MigrationProgress to JSON.

func (*MigrationProgress) MarshalProtoJSON

func (x *MigrationProgress) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the MigrationProgress message to JSON.

func (*MigrationProgress) MarshalProtoText

func (x *MigrationProgress) MarshalProtoText() string

func (*MigrationProgress) MarshalToSizedBufferVT

func (m *MigrationProgress) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*MigrationProgress) MarshalToVT

func (m *MigrationProgress) MarshalToVT(dAtA []byte) (int, error)

func (*MigrationProgress) MarshalVT

func (m *MigrationProgress) MarshalVT() (dAtA []byte, err error)

func (*MigrationProgress) ProtoMessage

func (*MigrationProgress) ProtoMessage()

func (*MigrationProgress) Reset

func (x *MigrationProgress) Reset()

func (*MigrationProgress) SizeVT

func (m *MigrationProgress) SizeVT() (n int)

func (*MigrationProgress) String

func (x *MigrationProgress) String() string

func (*MigrationProgress) UnmarshalJSON

func (x *MigrationProgress) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the MigrationProgress from JSON.

func (*MigrationProgress) UnmarshalProtoJSON

func (x *MigrationProgress) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the MigrationProgress message from JSON.

func (*MigrationProgress) UnmarshalVT

func (m *MigrationProgress) UnmarshalVT(dAtA []byte) error

type MigrationReferenceKind

type MigrationReferenceKind int32

MigrationReferenceKind identifies a typed identity field.

const (
	// MIGRATION_REFERENCE_KIND_UNSPECIFIED is the zero value.
	MigrationReferenceKind_MIGRATION_REFERENCE_KIND_UNSPECIFIED MigrationReferenceKind = 0
	// MIGRATION_REFERENCE_KIND_OBJECT_KEY is a Space-local object key.
	MigrationReferenceKind_MIGRATION_REFERENCE_KIND_OBJECT_KEY MigrationReferenceKind = 1
	// MIGRATION_REFERENCE_KIND_NESTED_SHARED_OBJECT is a nested SharedObject ID.
	MigrationReferenceKind_MIGRATION_REFERENCE_KIND_NESTED_SHARED_OBJECT MigrationReferenceKind = 2
	// MIGRATION_REFERENCE_KIND_CANVAS_NODE is a Canvas node identity.
	MigrationReferenceKind_MIGRATION_REFERENCE_KIND_CANVAS_NODE MigrationReferenceKind = 3
	// MIGRATION_REFERENCE_KIND_GRAPH_IRI is a graph IRI.
	MigrationReferenceKind_MIGRATION_REFERENCE_KIND_GRAPH_IRI MigrationReferenceKind = 4
	// MIGRATION_REFERENCE_KIND_EXTERNAL is an intentionally external reference.
	MigrationReferenceKind_MIGRATION_REFERENCE_KIND_EXTERNAL MigrationReferenceKind = 5
	// MIGRATION_REFERENCE_KIND_BLOCK_STORE is a block-store identity.
	MigrationReferenceKind_MIGRATION_REFERENCE_KIND_BLOCK_STORE MigrationReferenceKind = 6
)

func (MigrationReferenceKind) Enum

func (MigrationReferenceKind) MarshalJSON

func (x MigrationReferenceKind) MarshalJSON() ([]byte, error)

MarshalJSON marshals the MigrationReferenceKind to JSON.

func (MigrationReferenceKind) MarshalProtoJSON

func (x MigrationReferenceKind) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the MigrationReferenceKind to JSON.

func (MigrationReferenceKind) MarshalProtoText

func (x MigrationReferenceKind) MarshalProtoText() string

func (MigrationReferenceKind) MarshalText

func (x MigrationReferenceKind) MarshalText() ([]byte, error)

MarshalText marshals the MigrationReferenceKind to text.

func (MigrationReferenceKind) String

func (x MigrationReferenceKind) String() string

func (*MigrationReferenceKind) UnmarshalJSON

func (x *MigrationReferenceKind) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the MigrationReferenceKind from JSON.

func (*MigrationReferenceKind) UnmarshalProtoJSON

func (x *MigrationReferenceKind) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the MigrationReferenceKind from JSON.

func (*MigrationReferenceKind) UnmarshalText

func (x *MigrationReferenceKind) UnmarshalText(b []byte) error

UnmarshalText unmarshals the MigrationReferenceKind from text.

type MigrationStagingUnit

type MigrationStagingUnit struct {
	UnitId          string `protobuf:"bytes,1,opt,name=unit_id,json=unitId,proto3" json:"unitId,omitempty"`
	SourceRoot      string `protobuf:"bytes,2,opt,name=source_root,json=sourceRoot,proto3" json:"sourceRoot,omitempty"`
	DestinationRoot string `protobuf:"bytes,3,opt,name=destination_root,json=destinationRoot,proto3" json:"destinationRoot,omitempty"`
	LogicalBytes    uint64 `protobuf:"varint,4,opt,name=logical_bytes,json=logicalBytes,proto3" json:"logicalBytes,omitempty"`
	Completed       bool   `protobuf:"varint,5,opt,name=completed,proto3" json:"completed,omitempty"`
	// contains filtered or unexported fields
}

MigrationStagingUnit records one completed resumable staging unit.

func (*MigrationStagingUnit) CloneMessageVT

func (*MigrationStagingUnit) CloneVT

func (*MigrationStagingUnit) EqualMessageVT

func (this *MigrationStagingUnit) EqualMessageVT(thatMsg any) bool

func (*MigrationStagingUnit) EqualVT

func (this *MigrationStagingUnit) EqualVT(that *MigrationStagingUnit) bool

func (*MigrationStagingUnit) GetCompleted

func (x *MigrationStagingUnit) GetCompleted() bool

func (*MigrationStagingUnit) GetDestinationRoot

func (x *MigrationStagingUnit) GetDestinationRoot() string

func (*MigrationStagingUnit) GetLogicalBytes

func (x *MigrationStagingUnit) GetLogicalBytes() uint64

func (*MigrationStagingUnit) GetSourceRoot

func (x *MigrationStagingUnit) GetSourceRoot() string

func (*MigrationStagingUnit) GetUnitId

func (x *MigrationStagingUnit) GetUnitId() string

func (*MigrationStagingUnit) MarshalJSON

func (x *MigrationStagingUnit) MarshalJSON() ([]byte, error)

MarshalJSON marshals the MigrationStagingUnit to JSON.

func (*MigrationStagingUnit) MarshalProtoJSON

func (x *MigrationStagingUnit) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the MigrationStagingUnit message to JSON.

func (*MigrationStagingUnit) MarshalProtoText

func (x *MigrationStagingUnit) MarshalProtoText() string

func (*MigrationStagingUnit) MarshalToSizedBufferVT

func (m *MigrationStagingUnit) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*MigrationStagingUnit) MarshalToVT

func (m *MigrationStagingUnit) MarshalToVT(dAtA []byte) (int, error)

func (*MigrationStagingUnit) MarshalVT

func (m *MigrationStagingUnit) MarshalVT() (dAtA []byte, err error)

func (*MigrationStagingUnit) ProtoMessage

func (*MigrationStagingUnit) ProtoMessage()

func (*MigrationStagingUnit) Reset

func (x *MigrationStagingUnit) Reset()

func (*MigrationStagingUnit) SizeVT

func (m *MigrationStagingUnit) SizeVT() (n int)

func (*MigrationStagingUnit) String

func (x *MigrationStagingUnit) String() string

func (*MigrationStagingUnit) UnmarshalJSON

func (x *MigrationStagingUnit) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the MigrationStagingUnit from JSON.

func (*MigrationStagingUnit) UnmarshalProtoJSON

func (x *MigrationStagingUnit) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the MigrationStagingUnit message from JSON.

func (*MigrationStagingUnit) UnmarshalVT

func (m *MigrationStagingUnit) UnmarshalVT(dAtA []byte) error

type MigrationTerminalResult

type MigrationTerminalResult struct {

	// State identifies the terminal preview state.
	State MigrationTerminalState `protobuf:"varint,1,opt,name=state,proto3" json:"state,omitempty"`
	// Code is a stable machine-readable result code.
	Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
	// Detail is safe, non-secret diagnostic text.
	Detail string `protobuf:"bytes,3,opt,name=detail,proto3" json:"detail,omitempty"`
	// contains filtered or unexported fields
}

MigrationTerminalResult is the typed readback of a preview decision.

func (*MigrationTerminalResult) CloneMessageVT

func (*MigrationTerminalResult) CloneVT

func (*MigrationTerminalResult) EqualMessageVT

func (this *MigrationTerminalResult) EqualMessageVT(thatMsg any) bool

func (*MigrationTerminalResult) EqualVT

func (*MigrationTerminalResult) GetCode

func (x *MigrationTerminalResult) GetCode() string

func (*MigrationTerminalResult) GetDetail

func (x *MigrationTerminalResult) GetDetail() string

func (*MigrationTerminalResult) GetState

func (*MigrationTerminalResult) MarshalJSON

func (x *MigrationTerminalResult) MarshalJSON() ([]byte, error)

MarshalJSON marshals the MigrationTerminalResult to JSON.

func (*MigrationTerminalResult) MarshalProtoJSON

func (x *MigrationTerminalResult) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the MigrationTerminalResult message to JSON.

func (*MigrationTerminalResult) MarshalProtoText

func (x *MigrationTerminalResult) MarshalProtoText() string

func (*MigrationTerminalResult) MarshalToSizedBufferVT

func (m *MigrationTerminalResult) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*MigrationTerminalResult) MarshalToVT

func (m *MigrationTerminalResult) MarshalToVT(dAtA []byte) (int, error)

func (*MigrationTerminalResult) MarshalVT

func (m *MigrationTerminalResult) MarshalVT() (dAtA []byte, err error)

func (*MigrationTerminalResult) ProtoMessage

func (*MigrationTerminalResult) ProtoMessage()

func (*MigrationTerminalResult) Reset

func (x *MigrationTerminalResult) Reset()

func (*MigrationTerminalResult) SizeVT

func (m *MigrationTerminalResult) SizeVT() (n int)

func (*MigrationTerminalResult) String

func (x *MigrationTerminalResult) String() string

func (*MigrationTerminalResult) UnmarshalJSON

func (x *MigrationTerminalResult) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the MigrationTerminalResult from JSON.

func (*MigrationTerminalResult) UnmarshalProtoJSON

func (x *MigrationTerminalResult) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the MigrationTerminalResult message from JSON.

func (*MigrationTerminalResult) UnmarshalVT

func (m *MigrationTerminalResult) UnmarshalVT(dAtA []byte) error

type MigrationTerminalState

type MigrationTerminalState int32

MigrationTerminalState identifies the preview or operation terminal state.

const (
	// MIGRATION_TERMINAL_STATE_UNSPECIFIED is the zero value.
	MigrationTerminalState_MIGRATION_TERMINAL_STATE_UNSPECIFIED MigrationTerminalState = 0
	// MIGRATION_TERMINAL_STATE_PREVIEW_READY indicates no blockers.
	MigrationTerminalState_MIGRATION_TERMINAL_STATE_PREVIEW_READY MigrationTerminalState = 1
	// MIGRATION_TERMINAL_STATE_BLOCKED indicates typed preview blockers.
	MigrationTerminalState_MIGRATION_TERMINAL_STATE_BLOCKED MigrationTerminalState = 2
	// MIGRATION_TERMINAL_STATE_STALE indicates source or destination drift.
	MigrationTerminalState_MIGRATION_TERMINAL_STATE_STALE MigrationTerminalState = 3
	// MIGRATION_TERMINAL_STATE_FAILED indicates an invalid request.
	MigrationTerminalState_MIGRATION_TERMINAL_STATE_FAILED MigrationTerminalState = 4
)

func (MigrationTerminalState) Enum

func (MigrationTerminalState) MarshalJSON

func (x MigrationTerminalState) MarshalJSON() ([]byte, error)

MarshalJSON marshals the MigrationTerminalState to JSON.

func (MigrationTerminalState) MarshalProtoJSON

func (x MigrationTerminalState) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the MigrationTerminalState to JSON.

func (MigrationTerminalState) MarshalProtoText

func (x MigrationTerminalState) MarshalProtoText() string

func (MigrationTerminalState) MarshalText

func (x MigrationTerminalState) MarshalText() ([]byte, error)

MarshalText marshals the MigrationTerminalState to text.

func (MigrationTerminalState) String

func (x MigrationTerminalState) String() string

func (*MigrationTerminalState) UnmarshalJSON

func (x *MigrationTerminalState) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the MigrationTerminalState from JSON.

func (*MigrationTerminalState) UnmarshalProtoJSON

func (x *MigrationTerminalState) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the MigrationTerminalState from JSON.

func (*MigrationTerminalState) UnmarshalText

func (x *MigrationTerminalState) UnmarshalText(b []byte) error

UnmarshalText unmarshals the MigrationTerminalState from text.

type ObjectDescriptor

type ObjectDescriptor struct {
	ObjectKey         string
	ObjectType        string
	Revision          uint64
	RootDigest        string
	LogicalBytes      uint64
	LogicalBytesKnown bool
	// World is the read-only source World used for typed payload inspection.
	World world.WorldState
	// BlockStoreID is the source block-store identity from the object root.
	BlockStoreID string
	// GraphReferences are graph IRIs attached to this object by the read-only scan.
	GraphReferences       []string
	Dependencies          []string
	References            []TypedReference
	ExternalReferences    []string
	NestedSharedObjectIDs []string
	CanvasNodeIDs         []string
}

ObjectDescriptor is the secret-free metadata required by a migration handler.

type Planner

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

Planner builds immutable, read-only migration previews.

func NewPlanner

func NewPlanner(registry *Registry) *Planner

NewPlanner constructs a planner using the supplied migration registry.

func (*Planner) Plan

func (p *Planner) Plan(ctx context.Context, input *PlannerInput) (*MigrationPreview, error)

Plan scans both Worlds and returns a deterministic preview.

func (*Planner) VerifyFresh

func (p *Planner) VerifyFresh(ctx context.Context, input *PlannerInput, preview *MigrationPreview) error

VerifyFresh rejects a preview if either World changed after planning.

type PlannerInput

type PlannerInput struct {
	SourceSpaceID       string
	DestinationSpaceID  string
	Source              world.WorldState
	Destination         world.WorldState
	Operation           MigrationOperation
	SelectedObjectKeys  []string
	DestinationCapacity uint64
	CapacityKnown       bool
	// CollisionResolutions carries typed choices keyed by source object key.
	CollisionResolutions map[string]MigrationConflictResolution
}

PlannerInput describes the two World owners and read-only preview inputs.

type ReferenceKind

type ReferenceKind int32

ReferenceKind identifies the owner and rewrite semantics for one embedded identity.

const (
	// ReferenceObjectKey identifies a Space-local object key.
	ReferenceObjectKey ReferenceKind = 1
	// ReferenceNestedSharedObject identifies a nested SharedObject ID.
	ReferenceNestedSharedObject ReferenceKind = 2
	// ReferenceCanvasNode identifies a Canvas node ID.
	ReferenceCanvasNode ReferenceKind = 3
	// ReferenceGraphIRI identifies a graph IRI.
	ReferenceGraphIRI ReferenceKind = 4
	// ReferenceExternal identifies an intentionally external reference.
	ReferenceExternal ReferenceKind = 5
	// ReferenceBlockStore identifies a block-store identity.
	ReferenceBlockStore ReferenceKind = 6
)

type Registry

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

Registry owns the migration classification for registered ObjectTypes.

func BuiltInRegistry

func BuiltInRegistry() (*Registry, error)

BuiltInRegistry returns the complete built-in ObjectType classification.

func NewRegistry

func NewRegistry() *Registry

NewRegistry constructs an empty migration registry.

func (*Registry) Inspect

func (r *Registry) Inspect(ctx context.Context, object *ObjectDescriptor) (*Inspection, error)

Inspect runs the registered handler for one object.

func (*Registry) Lookup

func (r *Registry) Lookup(typeID string) Handler

Lookup returns the handler for an ObjectType, or nil when unclassified.

func (*Registry) Register

func (r *Registry) Register(handler Handler) error

Register adds one handler and rejects duplicate ObjectType registrations.

func (*Registry) TypeIDs

func (r *Registry) TypeIDs() []string

TypeIDs returns all registered ObjectTypes in lexical order.

type RewriteResult

type RewriteResult struct {
	// Payload is the serialized replacement root payload. It is never sourced
	// from ObjectDescriptor metadata.
	Payload []byte
	// References is the typed reference view of Payload.
	References []TypedReference
	// GraphReferences is the rewritten graph view owned by this payload.
	GraphReferences []string
}

RewriteResult contains a rewritten typed payload and graph identities.

type SchemaInspector

type SchemaInspector func(context.Context, *ObjectDescriptor) (*Inspection, error)

SchemaInspector decodes one registered built-in payload and returns only secret-free typed references. It must not open nested Secret payloads.

type SchemaRewriter

type SchemaRewriter func(context.Context, *ObjectDescriptor, *IdentityMap) (*RewriteResult, error)

SchemaRewriter decodes, rewrites, and serializes one registered payload.

type TypedHandler

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

TypedHandler is a built-in handler with explicit reference-field ownership.

func NewSchemaHandler

func NewSchemaHandler(typeID string, classification Classification, objectKeys, nestedSharedObjects, canvasNodes, graphIRIs, blockStores bool, inspect SchemaInspector, rewriters ...SchemaRewriter) *TypedHandler

NewSchemaHandler constructs a handler that decodes and rewrites its actual world payload. A missing rewriter is an intentional typed refusal, not a license to consume descriptor metadata.

func NewSchemaRefusalHandler

func NewSchemaRefusalHandler(typeID string, classification Classification, detail string) *TypedHandler

NewSchemaRefusalHandler registers a built-in whose payload is deliberately outside the Phase 0 schema boundary. Planning reports a typed refusal instead of consuming synthetic descriptor metadata.

func (*TypedHandler) Classification

func (h *TypedHandler) Classification() Classification

Classification returns the migration classification.

func (*TypedHandler) Inspect

func (h *TypedHandler) Inspect(ctx context.Context, object *ObjectDescriptor) (*Inspection, error)

Inspect returns typed dependencies and external disclosures from the actual payload, never from caller-provided metadata.

func (*TypedHandler) Rewrite

func (h *TypedHandler) Rewrite(ctx context.Context, object *ObjectDescriptor, mapping *IdentityMap) (*RewriteResult, error)

Rewrite returns a serialized typed payload and any graph identities owned by it. Descriptor-side synthetic references are intentionally ignored.

func (*TypedHandler) TypeID

func (h *TypedHandler) TypeID() string

TypeID returns the ObjectType identifier owned by this handler.

type TypedReference

type TypedReference struct {
	Kind  ReferenceKind
	Value string
}

TypedReference is one typed dependency or embedded identity.

Jump to

Keyboard shortcuts

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