Skip to main content

tuwunel_admin/query/
mod.rs

1mod account_data;
2mod appservice;
3mod feds;
4mod globals;
5mod oauth;
6mod peer_status;
7mod presence;
8mod pusher;
9mod raw;
10mod resolver;
11mod room_alias;
12mod room_state_cache;
13mod room_timeline;
14mod sending;
15mod short;
16mod storage;
17mod sync;
18mod threepid;
19mod users;
20
21use clap::Subcommand;
22use tuwunel_core::Result;
23
24use self::{
25	account_data::AccountDataCommand, appservice::AppserviceCommand, feds::FedsCommand,
26	globals::GlobalsCommand, oauth::OauthCommand, peer_status::PeerStatusCommand,
27	presence::PresenceCommand, pusher::PusherCommand, raw::RawCommand, resolver::ResolverCommand,
28	room_alias::RoomAliasCommand, room_state_cache::RoomStateCacheCommand,
29	room_timeline::RoomTimelineCommand, sending::SendingCommand, short::ShortCommand,
30	storage::StorageCommand, sync::SyncCommand, threepid::ThreepidCommand, users::UsersCommand,
31};
32use crate::{
33	admin_command_dispatch,
34	event_fetcher::{self as fetch, EventFetcherCommand},
35};
36
37#[admin_command_dispatch]
38#[derive(Debug, Subcommand)]
39/// Query tables from database
40pub(super) enum QueryCommand {
41	/// - account_data.rs iterators and getters
42	#[command(subcommand)]
43	AccountData(AccountDataCommand),
44
45	/// - appservice.rs iterators and getters
46	#[command(subcommand)]
47	Appservice(AppserviceCommand),
48
49	/// - federation fanout diagnostics
50	#[command(subcommand)]
51	Feds(FedsCommand),
52
53	/// - Drive the federation event-fetcher service directly (diagnostic)
54	#[command(subcommand)]
55	Fetch(EventFetcherCommand),
56
57	/// - presence.rs iterators and getters
58	#[command(subcommand)]
59	Presence(PresenceCommand),
60
61	/// - rooms/alias.rs iterators and getters
62	#[command(subcommand)]
63	RoomAlias(RoomAliasCommand),
64
65	/// - rooms/state_cache iterators and getters
66	#[command(subcommand)]
67	RoomStateCache(RoomStateCacheCommand),
68
69	/// - rooms/timeline iterators and getters
70	#[command(subcommand)]
71	RoomTimeline(RoomTimelineCommand),
72
73	/// - globals.rs iterators and getters
74	#[command(subcommand)]
75	Globals(GlobalsCommand),
76
77	/// - sending.rs iterators and getters
78	#[command(subcommand)]
79	Sending(SendingCommand),
80
81	/// - users.rs iterators and getters
82	#[command(subcommand)]
83	Users(UsersCommand),
84
85	/// - threepid service
86	#[command(subcommand)]
87	Threepid(ThreepidCommand),
88
89	/// - resolver service
90	#[command(subcommand)]
91	Resolver(ResolverCommand),
92
93	/// - per-server reachability store on the federation service
94	#[command(subcommand)]
95	PeerStatus(PeerStatusCommand),
96
97	/// - pusher service
98	#[command(subcommand)]
99	Pusher(PusherCommand),
100
101	/// - short service
102	#[command(subcommand)]
103	Short(ShortCommand),
104
105	/// - storage service
106	#[command(subcommand)]
107	Storage(StorageCommand),
108
109	/// - sync service
110	#[command(subcommand)]
111	Sync(SyncCommand),
112
113	/// - oauth service
114	#[command(subcommand)]
115	Oauth(OauthCommand),
116
117	/// - raw service
118	#[command(subcommand)]
119	Raw(RawCommand),
120}