Documentation
¶
Overview ¶
Package importer coordinates portable imports without exposing source credentials. Purpose: shared source contract. Inputs: env-name flags and a started target. Outputs: a verified report. Constraints: sources own extraction only.
Index ¶
- Constants
- func AllowMessages(messages ...string)
- func Register(s Source)
- func RegistryErrors() []error
- func SystemTables(schema, name string, storage bool) bool
- type Detection
- type Extracted
- type FlagSpec
- type HasuraReport
- type Input
- type Policy
- type Report
- type ResetUser
- type RunOptions
- type Source
- type StorageReport
- type TableReport
- type UsersReport
Constants ¶
const PartitionedPrefix = "source table is partitioned (not supported yet): "
PartitionedPrefix starts the E520 message that names an unsupported partitioned source table.
Variables ¶
This section is empty.
Functions ¶
func AllowMessages ¶ added in v1.4.15
func AllowMessages(messages ...string)
AllowMessages registers texts that publicError may surface unchanged for E517 and E520 source failures.
func RegistryErrors ¶
func RegistryErrors() []error
func SystemTables ¶
SystemTables excludes nSelf-owned data, with storage excluded only when enabled.
Types ¶
type Detection ¶
type Detection struct {
Kind string `json:"kind"`
Version string `json:"version"`
Notes []string `json:"notes"`
Schemas []string `json:"schemas"`
// SourceUsers counts the source auth users seen at detection; --plan uses it to run the
// same auth.users preflight as the real run.
SourceUsers int `json:"source_users,omitempty"`
// Objects lists the bucket/key pairs a bundle source will load, for the --plan object-store check.
// It never reaches the report: keys can be user file names.
Objects []portable.Object `json:"-"`
}
type Extracted ¶
Extracted names the written bundle. UntranslatedPolicies lists the source access rules the source could not express as Hasura permissions; they reach the report unchanged.
type HasuraReport ¶
type Report ¶
type Report struct {
Source string `json:"source"`
RunID string `json:"run_id"`
Result string `json:"result"`
Tables []TableReport `json:"tables"`
Users UsersReport `json:"users"`
Storage StorageReport `json:"storage"`
Hasura HasuraReport `json:"hasura"`
UntranslatedPolicies []Policy `json:"untranslated_policies"`
// CompatShims names the source objects the bundle's db/compat.sql re-creates in the target.
CompatShims []string `json:"compat_shims"`
Exemptions []portable.Exemption `json:"exemptions"`
Mismatches []verify.Mismatch `json:"mismatches"`
Steps []string `json:"steps,omitempty"`
// Wrote is true once the target may have changed; LastStep is the last finished load step.
Wrote bool `json:"wrote"`
LastStep string `json:"last_step,omitempty"`
Detection *Detection `json:"detection,omitempty"`
}
type RunOptions ¶
type Source ¶
type StorageReport ¶
type TableReport ¶
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package appwrite imports an Appwrite project through its REST API.
|
Package appwrite imports an Appwrite project through its REST API. |
|
Package firebase registers the Firebase importer source (`nself db import firebase`).
|
Package firebase registers the Firebase importer source (`nself db import firebase`). |
|
Package hasuracloud registers the hasura-cloud importer.
|
Package hasuracloud registers the hasura-cloud importer. |
|
Package hasurameta reads a source Hasura's metadata and recomposes a portable bundle.
|
Package hasurameta reads a source Hasura's metadata and recomposes a portable bundle. |
|
Package load applies verified bundles to fresh, started targets.
|
Package load applies verified bundles to fresh, started targets. |
|
Package nhost registers the nhost importer.
|
Package nhost registers the nhost importer. |
|
Package nself registers the portable-bundle importer: the re-import half of `nself db export`.
|
Package nself registers the portable-bundle importer: the re-import half of `nself db export`. |
|
Package postgres registers the base snapshot importer.
|
Package postgres registers the base snapshot importer. |
|
Package scratch turns generated DDL and COPY files into a portable Postgres bundle.
|
Package scratch turns generated DDL and COPY files into a portable Postgres bundle. |
|
Package supabase registers the Supabase importer.
|
Package supabase registers the Supabase importer. |
|
Package testkit provides isolated source fixtures and target projects.
|
Package testkit provides isolated source fixtures and target projects. |
|
Package verify defines the importer's zero-mismatch rule.
|
Package verify defines the importer's zero-mismatch rule. |