function

Import

func Import( ctx context.Context, target Target, source Export, actor *store.Document, ) (Result, error)

Import each chosen record through Ridu operations.

Source migration/payload/payload.go:152

@param ctx
The ctx value.
@param target
The target value.
@param source
The source value.
@param actor
The actor value.
@returns
The declared result.

Stops on the first failed record and returns the partial Result. IDs maps source collection and source ID to the created Ridu ID. This is a normalized content importer, not automatic Payload project or database compatibility.

Related types

  • Target

    The narrow destination contract used by Import.

  • Export

    A normalized, source-independent Payload export.

  • Document

    A stored document with status and version metadata.

  • Result

    Completed import count and source-to-target ID mapping.