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 todjogi_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
- Inventory
Descriptor Provider - The link-time inventory-backed
DescriptorProvider— the only shipped implementation. - Table
Health - Snapshot of a single table’s vacuum / partition health.
Enums§
- Analyze
Error - Errors surfaced by
run/fetch_table_health. - Analyze
Format - 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
ExitCodeviadispatch. - Live
CmdError - Errors raised by the
livesubcommand. Each variant carries a dedicated exit-code mapping; conversion lives inLiveCmdError::exit_code. - Migrate
Command - Migrations
Command - Partial
Apply Resolution Cli - CLI-side mirror of
djogi::migrate::PartialApplyResolutionfor therepair partial-applyresolution argument. - Recommendation
- Recommendation produced by
recommendfor a single table. - Repair
Subcommand djogi migrations repair <subcommand>— the four operator-confirmed repair flows.- Schema
Error - Errors surfaced by [
run]. - Schema
Format - Output format for
djogi schema. Mirrors [schema::SchemaFormat] soclap::ValueEnumlives at the CLI boundary and theschemamodule stays clap-free. - TopCommand
- Verify
Error - 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 underlyingSnapshotKeyError, and the audit-pool variant records the URL we failed to reach.
Traits§
- Descriptor
Provider - Source of the
#[derive(Model)]descriptors a descriptor-dependent command operates on.
Functions§
- apply_
cmd djogi migrations applyentry point.- attune_
cmd djogi migrations attuneentry point.- baseline_
cmd djogi migrations baselineentry point.- cleanup_
test_ dbs_ cmd djogi db cleanup-test-dbsentry point — drops orphaneddjogi_test_<uuid>databases left behind by#[djogi_test]runs killed by SIGKILL / OOM / panic-after-spawn beforedjogi::testing::teardown_test_dbcould fire.- compose_
cmd djogi migrations composeentry point.- dispatch
- Top-level entry point invoked by [
crate::main]. Builds a runtime, drives the async dispatch, and folds the resultingLiveCmdErrorto anExitCodeviaLiveCmdError::exit_code. - docs_
cmd djogi docsentry point.- fetch_
table_ health - Pull live-DB stats from
pg_stat_user_tablesand (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
OfflineOnlyoperation. Hoisted into a free function so the futurelive planengine 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 theLiveCmdError::exit_code()contract (exit 2). - repair_
checksum_ drift_ cmd djogi migrations repair checksum-driftentry point.- repair_
cmd djogi migrations repair <subcommand>entry point.- repair_
partial_ apply_ cmd djogi migrations repair partial-applyentry point.- repair_
resume_ partial_ apply_ cmd djogi migrations repair resume-partialentry point.- repair_
snapshot_ rebuild_ cmd djogi migrations repair snapshot-rebuildentry point.- reset_
cmd djogi db resetentry point.- run
djogi analyzeentry point — consumed bymain.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 seedentry point.- status_
cmd djogi migrations statusentry point.- verify_
cmd djogi migrations verifyentry point.