function
Import
Import each chosen record through Ridu operations.
Arguments
| Argument | Type | Description |
|---|---|---|
ctx | context.Context | The ctx value. |
target | Target | The target value. |
source | Export | The source value. |
actor | *store.Document | The actor value. |
Returns
The declared result.
(Result, error)How it works
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.
Full signature
func Import(
ctx context.Context,
target Target,
source Export,
actor *store.Document,
) (Result, error)