method

LocalAPI.Import

Import creates a document with a migration-owned stable ID while still running ordinary access, validation, hooks, transaction, and version logic.

Arguments

ArgumentTypeDescription
ctxcontext.ContextThe ctx value.
collectionstringThe collection value.
valuesstore.ValuesThe values value.
optionsImportOptionsThe options value.

Returns

The declared result.

(store.Document, error)

Full signature

func (local *LocalAPI) Import( ctx context.Context, collection string, values store.Values, options ImportOptions, ) (store.Document, error)

Source core/local.go:320

Related types

  • LocalAPI

    In-process content operations that share the REST authorization and lifecycle pipeline.

  • Values

    A map of field names to typed values.

  • ImportOptions

    Migration-owned source identity, status, and timestamps.

  • Document

    A stored document with status and version metadata.