2024-06-16 22:26:52 +00:00
|
|
|
mod account_data;
|
|
|
|
mod appservice;
|
|
|
|
mod globals;
|
|
|
|
mod presence;
|
2024-09-15 19:56:29 -04:00
|
|
|
mod pusher;
|
2025-01-04 16:57:07 +00:00
|
|
|
mod raw;
|
2024-07-04 11:49:13 +00:00
|
|
|
mod resolver;
|
2024-06-16 22:26:52 +00:00
|
|
|
mod room_alias;
|
|
|
|
mod room_state_cache;
|
2025-01-04 16:57:07 +00:00
|
|
|
mod room_timeline;
|
2024-06-16 22:26:52 +00:00
|
|
|
mod sending;
|
2025-01-04 16:57:07 +00:00
|
|
|
mod short;
|
2024-06-16 22:26:52 +00:00
|
|
|
mod users;
|
2024-04-20 17:59:54 -04:00
|
|
|
|
|
|
|
use clap::Subcommand;
|
2024-12-14 21:58:01 -05:00
|
|
|
use conduwuit::Result;
|
2024-04-20 17:59:54 -04:00
|
|
|
|
|
|
|
use self::{
|
2024-07-27 00:11:41 +00:00
|
|
|
account_data::AccountDataCommand, appservice::AppserviceCommand, globals::GlobalsCommand,
|
2025-01-04 16:57:07 +00:00
|
|
|
presence::PresenceCommand, pusher::PusherCommand, raw::RawCommand, resolver::ResolverCommand,
|
2024-12-15 00:05:47 -05:00
|
|
|
room_alias::RoomAliasCommand, room_state_cache::RoomStateCacheCommand,
|
2025-01-04 16:57:07 +00:00
|
|
|
room_timeline::RoomTimelineCommand, sending::SendingCommand, short::ShortCommand,
|
|
|
|
users::UsersCommand,
|
2024-04-20 17:59:54 -04:00
|
|
|
};
|
2024-07-27 00:11:41 +00:00
|
|
|
use crate::admin_command_dispatch;
|
2024-04-20 17:59:54 -04:00
|
|
|
|
2024-07-27 00:11:41 +00:00
|
|
|
#[admin_command_dispatch]
|
2024-07-24 00:13:03 +00:00
|
|
|
#[derive(Debug, Subcommand)]
|
2024-04-20 17:59:54 -04:00
|
|
|
/// Query tables from database
|
2025-05-24 00:28:09 +01:00
|
|
|
pub enum QueryCommand {
|
2024-04-20 17:59:54 -04:00
|
|
|
/// - account_data.rs iterators and getters
|
|
|
|
#[command(subcommand)]
|
2024-07-27 00:11:41 +00:00
|
|
|
AccountData(AccountDataCommand),
|
2024-04-20 17:59:54 -04:00
|
|
|
|
|
|
|
/// - appservice.rs iterators and getters
|
|
|
|
#[command(subcommand)]
|
2024-07-27 00:11:41 +00:00
|
|
|
Appservice(AppserviceCommand),
|
2024-04-20 17:59:54 -04:00
|
|
|
|
|
|
|
/// - presence.rs iterators and getters
|
|
|
|
#[command(subcommand)]
|
2024-07-27 00:11:41 +00:00
|
|
|
Presence(PresenceCommand),
|
2024-04-20 17:59:54 -04:00
|
|
|
|
|
|
|
/// - rooms/alias.rs iterators and getters
|
|
|
|
#[command(subcommand)]
|
2024-07-27 00:11:41 +00:00
|
|
|
RoomAlias(RoomAliasCommand),
|
2024-04-20 17:59:54 -04:00
|
|
|
|
2024-06-07 19:47:07 -04:00
|
|
|
/// - rooms/state_cache iterators and getters
|
|
|
|
#[command(subcommand)]
|
2024-07-27 00:11:41 +00:00
|
|
|
RoomStateCache(RoomStateCacheCommand),
|
2024-06-07 19:47:07 -04:00
|
|
|
|
2025-01-04 16:57:07 +00:00
|
|
|
/// - rooms/timeline iterators and getters
|
|
|
|
#[command(subcommand)]
|
|
|
|
RoomTimeline(RoomTimelineCommand),
|
|
|
|
|
2024-04-20 17:59:54 -04:00
|
|
|
/// - globals.rs iterators and getters
|
|
|
|
#[command(subcommand)]
|
2024-07-27 00:11:41 +00:00
|
|
|
Globals(GlobalsCommand),
|
2024-04-21 15:00:54 -04:00
|
|
|
|
2024-04-21 19:37:52 -04:00
|
|
|
/// - sending.rs iterators and getters
|
2024-04-21 15:00:54 -04:00
|
|
|
#[command(subcommand)]
|
2024-07-27 00:11:41 +00:00
|
|
|
Sending(SendingCommand),
|
2024-04-21 19:37:52 -04:00
|
|
|
|
|
|
|
/// - users.rs iterators and getters
|
|
|
|
#[command(subcommand)]
|
2024-07-27 00:11:41 +00:00
|
|
|
Users(UsersCommand),
|
2024-07-04 11:49:13 +00:00
|
|
|
|
|
|
|
/// - resolver service
|
|
|
|
#[command(subcommand)]
|
2024-07-27 00:11:41 +00:00
|
|
|
Resolver(ResolverCommand),
|
2024-09-15 19:56:29 -04:00
|
|
|
|
|
|
|
/// - pusher service
|
|
|
|
#[command(subcommand)]
|
|
|
|
Pusher(PusherCommand),
|
2025-01-04 16:57:07 +00:00
|
|
|
|
|
|
|
/// - short service
|
|
|
|
#[command(subcommand)]
|
|
|
|
Short(ShortCommand),
|
|
|
|
|
|
|
|
/// - raw service
|
|
|
|
#[command(subcommand)]
|
|
|
|
Raw(RawCommand),
|
2024-04-20 17:59:54 -04:00
|
|
|
}
|