Skip to main content

Crate siderite_cli

Crate siderite_cli 

Source
Expand description

The siderite command line.

Two entry points:

  • AppCli is the command line of an application binary. It needs the application’s App and model metadata, so it can serve the app (run), list its routes, validate it (check), open a database shell and run every migration command including makemigrations.
  • run is the siderite binary. In a Cargo package it wraps cargo run for those commands; new writes a project; without a package it runs JSON-file migrate / rollback / showmigrations / squashmigrations.

Re-exports§

pub use check::CheckIssue;
pub use check::CheckLevel;
pub use check::check;
pub use connect::connect_url;
pub use dbshell::ShellCommand;
pub use routes::RouteRow;
pub use routes::render_routes;
pub use routes::route_table;
pub use seed::SeedError;
pub use seed::Seeding;
pub use settings::CliSettings;
pub use settings::DEFAULT_ADDR;

Modules§

check
check: validate the app, its models and its configuration without starting a server or opening a database.
commands
The command contract: one table describing every siderite command.
connect
Open a Db from a database URL.
dbshell
dbshell: start the backend’s native client (sqlite3, psql, mysql).
report
Typed reports and the output contract shared by the text and JSON renderers.
routes
routes: the table of METHOD PATH operation_id an app serves.
seed
seed --dataset NAME and seed --list: datasets the application registers with AppCli::seed, loaded only when asked for, into the database the global flags select.
settings
The settings the command line needs, as plain values.

Structs§

AppCli
The commands that need the application’s own App and models, so they run from the application binary rather than the standalone siderite tool.

Enums§

CliError
Failure of an AppCli command.

Functions§

run
Entry point of the siderite binary.