Skip to main content

Crate djogi_cli

Crate djogi_cli 

Source
Expand description

Djogi CLI library — entry points for the djogi binary and for adopter-linked binaries that inject their own DescriptorProvider.

The published standalone djogi binary links no adopter model crates, so reading the global inventory registry directly yields zero adopter models. Injecting a DescriptorProvider lets an adopter-linked binary supply its own models. See run_with_provider.

Macros§

djogi_main
Generate a fn main() that references model types to prevent the LTO linker from dropping inventory data, then delegates to djogi_cli::run_from_env().
link_anchor
Emit a once-per-crate linkage anchor so an adopter binary can force link-time retention of THIS crate’s #[derive(Model)] registrations without listing every model type (#370, branch b).

Structs§

Cli
InventoryDescriptorProvider
The link-time inventory-backed DescriptorProvider — the only shipped implementation.
TableHealth
Snapshot of a single table’s vacuum / partition health.

Enums§

AnalyzeError
Errors surfaced by run / fetch_table_health.
AnalyzeFormat
Output format for djogi analyze — clap-side mirror of [analyze::AnalyzeFormat].
DbCommand
LiveCmd
Operator surface for the live-migration runner. Every subcommand resolves to an ExitCode via dispatch.
LiveCmdError
Errors raised by the live subcommand. Each variant carries a dedicated exit-code mapping; conversion lives in LiveCmdError::exit_code.
MigrateCommand
MigrationsCommand
PartialApplyResolutionCli
CLI-side mirror of djogi::migrate::PartialApplyResolution for the repair partial-apply resolution argument.
Recommendation
Recommendation produced by recommend for a single table.
RepairSubcommand
djogi migrations repair <subcommand> — the four operator-confirmed repair flows.
SchemaError
Errors surfaced by [run].
SchemaFormat
Output format for djogi schema. Mirrors [schema::SchemaFormat] so clap::ValueEnum lives at the CLI boundary and the schema module stays clap-free.
TopCommand
VerifyError
Errors surfaced by [run]. Each variant carries enough context for an operator to act without grepping source — the I/O variants name the path, the key-decode variant carries the underlying SnapshotKeyError, and the audit-pool variant records the URL we failed to reach.

Traits§

DescriptorProvider
Source of the #[derive(Model)] descriptors a descriptor-dependent command operates on.

Functions§

apply_cmd
djogi migrations apply entry point.
attune_cmd
djogi migrations attune entry point.
baseline_cmd
djogi migrations baseline entry point.
cleanup_test_dbs_cmd
djogi db cleanup-test-dbs entry point — drops orphaned djogi_test_<uuid> databases left behind by #[djogi_test] runs killed by SIGKILL / OOM / panic-after-spawn before djogi::testing::teardown_test_db could fire.
compose_cmd
djogi migrations compose entry point.
dispatch
Top-level entry point invoked by [crate::main]. Builds a runtime, drives the async dispatch, and folds the resulting LiveCmdError to an ExitCode via LiveCmdError::exit_code.
docs_cmd
djogi docs entry point.
fetch_table_health
Pull live-DB stats from pg_stat_user_tables and (optionally) pg_partman.show_partitions(...) for every user table.
print_support_boundary_error
Print a support-boundary preflight error to stderr.
recommend
Pure recommendation function for a single table.
refuse_offline_only
Refuse the live-plan compose path when the delta carries an OfflineOnly operation. Hoisted into a free function so the future live plan engine wires it in by importing this helper rather than re-deriving the message shape; the wider call surface here surfaces the variant in the public API for the LiveCmdError::exit_code() contract (exit 2).
repair_checksum_drift_cmd
djogi migrations repair checksum-drift entry point.
repair_cmd
djogi migrations repair <subcommand> entry point.
repair_partial_apply_cmd
djogi migrations repair partial-apply entry point.
repair_resume_partial_apply_cmd
djogi migrations repair resume-partial entry point.
repair_snapshot_rebuild_cmd
djogi migrations repair snapshot-rebuild entry point.
reset_cmd
djogi db reset entry point.
run
djogi analyze entry point — consumed by main.rs::TopCommand::Analyze.
run_from_env
Run the CLI by parsing arguments from std::env::args_os().
run_with_args
Run the CLI with an explicit argument iterable. Useful for testing and embedding.
run_with_provider
Run the CLI with an explicit argument iterable and a DescriptorProvider.
seed_cmd
djogi db seed entry point.
status_cmd
djogi migrations status entry point.
verify_cmd
djogi migrations verify entry point.