Documentation
¶
Overview ¶
Package nself registers the portable-bundle importer: the re-import half of `nself db export`. Purpose: validate a v1 bundle and stage it unchanged so the shared loader and verifier run on it. Inputs: the bundle directory (Values["dir"]). Outputs: a staged byte-identical bundle. Constraints: the bundle is never modified; errors carry the portable reader's text (member paths and manifest values), which the shared run filters before it reaches the user.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Source ¶
type Source struct{}
Source imports a directory written by `nself db export` (or kept by --keep-stage).
func (Source) Detect ¶
Detect reads the manifest, checks the Postgres major against the target and reports the bundle's schemas and user count so --plan runs the same target preflights as the real run.
func (Source) Extract ¶
func (Source) Extract(ctx context.Context, in importer.Input, stage string) (importer.Extracted, error)
Extract copies the verified bundle into stage byte for byte. A hard link would be refused by the reader (members must be singly linked), so every member is copied through a checking reader. The staged copy is opened again and its manifest must equal the one verified from the source, so a bundle that changes while it is staged is refused (E516) rather than loaded.