mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 07:41:23 +01:00
add command to get the state of all rooms
This commit is contained in:
parent
2f8e0e3e52
commit
33598a79b7
4 changed files with 183 additions and 0 deletions
25
src/error.rs
25
src/error.rs
|
|
@ -43,6 +43,9 @@ pub(crate) enum Main {
|
|||
#[error(transparent)]
|
||||
ServeCommand(#[from] ServeCommand),
|
||||
|
||||
#[error(transparent)]
|
||||
DumpStateCommand(#[from] DumpStateCommand),
|
||||
|
||||
#[error("failed to install global default tracing subscriber")]
|
||||
SetSubscriber(#[from] tracing::subscriber::SetGlobalDefaultError),
|
||||
|
||||
|
|
@ -85,6 +88,28 @@ pub(crate) enum CheckConfigCommand {
|
|||
Config(#[from] Config),
|
||||
}
|
||||
|
||||
/// Errors returned from the `dump-state` CLI subcommand.
|
||||
// Missing docs are allowed here since that kind of information should be
|
||||
// encoded in the error messages themselves anyway.
|
||||
#[allow(missing_docs)]
|
||||
#[derive(Error, Debug)]
|
||||
pub(crate) enum DumpStateCommand {
|
||||
#[error("failed to load configuration")]
|
||||
Config(#[from] Config),
|
||||
|
||||
#[error("failed to initialize services")]
|
||||
InitializeServices(#[source] crate::utils::error::Error),
|
||||
|
||||
#[error("failed to load or create the database")]
|
||||
Database(#[source] crate::utils::error::Error),
|
||||
|
||||
#[error("`server_name` change check failed")]
|
||||
ServerNameChanged(#[from] ServerNameChanged),
|
||||
|
||||
#[error("failed to serialize state to stdout")]
|
||||
Serialize(#[from] serde_json::Error),
|
||||
}
|
||||
|
||||
/// Error generated if `server_name` has changed or if checking this failed
|
||||
// Missing docs are allowed here since that kind of information should be
|
||||
// encoded in the error messages themselves anyway.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue