Skip to main content

tuwunel_admin/query/
mod.rs

1mod account_data;
2mod appservice;
3mod globals;
4mod oauth;
5mod presence;
6mod pusher;
7mod raw;
8mod resolver;
9mod room_alias;
10mod room_state_cache;
11mod room_timeline;
12mod sending;
13mod short;
14mod storage;
15mod sync;
16mod users;
17
18use clap::Subcommand;
19use tuwunel_core::Result;
20
21use self::{
22	account_data::AccountDataCommand, appservice::AppserviceCommand, globals::GlobalsCommand,
23	oauth::OauthCommand, presence::PresenceCommand, pusher::PusherCommand, raw::RawCommand,
24	resolver::ResolverCommand, room_alias::RoomAliasCommand,
25	room_state_cache::RoomStateCacheCommand, room_timeline::RoomTimelineCommand,
26	sending::SendingCommand, short::ShortCommand, storage::StorageCommand, sync::SyncCommand,
27	users::UsersCommand,
28};
29use crate::admin_command_dispatch;
30
31#[admin_command_dispatch]
32#[derive(Debug, Subcommand)]
33/// Query tables from database
34pub(super) enum QueryCommand {
35	/// - account_data.rs iterators and getters
36	#[command(subcommand)]
37	AccountData(AccountDataCommand),
38
39	/// - appservice.rs iterators and getters
40	#[command(subcommand)]
41	Appservice(AppserviceCommand),
42
43	/// - presence.rs iterators and getters
44	#[command(subcommand)]
45	Presence(PresenceCommand),
46
47	/// - rooms/alias.rs iterators and getters
48	#[command(subcommand)]
49	RoomAlias(RoomAliasCommand),
50
51	/// - rooms/state_cache iterators and getters
52	#[command(subcommand)]
53	RoomStateCache(RoomStateCacheCommand),
54
55	/// - rooms/timeline iterators and getters
56	#[command(subcommand)]
57	RoomTimeline(RoomTimelineCommand),
58
59	/// - globals.rs iterators and getters
60	#[command(subcommand)]
61	Globals(GlobalsCommand),
62
63	/// - sending.rs iterators and getters
64	#[command(subcommand)]
65	Sending(SendingCommand),
66
67	/// - users.rs iterators and getters
68	#[command(subcommand)]
69	Users(UsersCommand),
70
71	/// - resolver service
72	#[command(subcommand)]
73	Resolver(ResolverCommand),
74
75	/// - pusher service
76	#[command(subcommand)]
77	Pusher(PusherCommand),
78
79	/// - short service
80	#[command(subcommand)]
81	Short(ShortCommand),
82
83	/// - storage service
84	#[command(subcommand)]
85	Storage(StorageCommand),
86
87	/// - sync service
88	#[command(subcommand)]
89	Sync(SyncCommand),
90
91	/// - oauth service
92	#[command(subcommand)]
93	Oauth(OauthCommand),
94
95	/// - raw service
96	#[command(subcommand)]
97	Raw(RawCommand),
98}