oxide_batch_cli/lib.rs
1//! The minimal guarded operator command line for `OxideBatch`.
2//!
3//! This crate is a thin client over the portable operator, explorer, and
4//! retention services. It owns no correctness rule of its own: every guard,
5//! every compare-and-swap, every idempotency record, and every audit row
6//! belongs to the services it calls. Removing this crate removes no correctness
7//! capability.
8//!
9//! The crate is both a library and a binary. The shipped `oxide-batch` binary
10//! serves every command that a repository alone can answer. `launch` and
11//! `execution restart` additionally need the job's canonical
12//! [`DefinitionIdentity`](oxide_batch::DefinitionIdentity), which only the
13//! owning application can construct, so a host application embeds this crate
14//! and supplies a [`DefinitionCatalog`].
15//!
16//! # Boundaries
17//!
18//! The CLI adds no hosted API, no identity system, no scheduler, and no user
19//! interface. It never writes metadata directly, and repository state rather
20//! than CLI output or process state is authoritative.
21
22#![forbid(unsafe_code)]
23
24mod args;
25#[cfg(feature = "postgres")]
26mod backend;
27mod bundle;
28mod catalog;
29mod command;
30mod config;
31mod exit;
32mod failure;
33mod host;
34mod output;
35mod project;
36mod run;
37
38pub use args::{ArgumentError, Arguments, DirectiveArg, OutputForm, RecordArg};
39pub use catalog::{CatalogError, DefinitionCatalog};
40pub use command::{ActionClass, Command};
41pub use config::{
42 CONFIG_VERSION, ConfigError, ConfigIssue, Configuration, EffectiveValue, Resolved, Secret,
43 Source, TlsSetting, default_config_path, environment_variable, known_keys,
44};
45pub use exit::{ExitCategory, Outcome};
46pub use host::{Host, ProcessHost};
47pub use output::{
48 Diagnostic, MAX_OUTPUT_BYTES, OUTPUT_SCHEMA_VERSION, OutputFailure, PageInfo, Response, Writer,
49};
50pub use run::{
51 NoSchema, Plan, RecoveryProposalPort, SchemaReport, SchemaState, Services, dispatch, local,
52 prepare,
53};
54
55#[cfg(feature = "postgres")]
56pub use backend::{BackendFailure, PostgresServices, connect, connection_config};