mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-07-08 11:40:01 +02:00
The first part of getting admin command docs on the website. There's also the beginnings of manpage generation here, although it's kinda sus and I'm not sure how it's supposed to work. I'll leave that to anyone who wants to package it. We introduce the beginings of the xtask pattern here - we do a lot of file generation, I thought it would be best to avoid doing that on every compilation. It also helps avoid lots of runtime deps. We'll need to document generating this stuff & probably add pre-commit hooks for it, though.
82 lines
1.9 KiB
Rust
82 lines
1.9 KiB
Rust
mod account_data;
|
|
mod appservice;
|
|
mod globals;
|
|
mod presence;
|
|
mod pusher;
|
|
mod raw;
|
|
mod resolver;
|
|
mod room_alias;
|
|
mod room_state_cache;
|
|
mod room_timeline;
|
|
mod sending;
|
|
mod short;
|
|
mod users;
|
|
|
|
use clap::Subcommand;
|
|
use conduwuit::Result;
|
|
|
|
use self::{
|
|
account_data::AccountDataCommand, appservice::AppserviceCommand, globals::GlobalsCommand,
|
|
presence::PresenceCommand, pusher::PusherCommand, raw::RawCommand, resolver::ResolverCommand,
|
|
room_alias::RoomAliasCommand, room_state_cache::RoomStateCacheCommand,
|
|
room_timeline::RoomTimelineCommand, sending::SendingCommand, short::ShortCommand,
|
|
users::UsersCommand,
|
|
};
|
|
use crate::admin_command_dispatch;
|
|
|
|
#[admin_command_dispatch]
|
|
#[derive(Debug, Subcommand)]
|
|
/// Query tables from database
|
|
pub enum QueryCommand {
|
|
/// - account_data.rs iterators and getters
|
|
#[command(subcommand)]
|
|
AccountData(AccountDataCommand),
|
|
|
|
/// - appservice.rs iterators and getters
|
|
#[command(subcommand)]
|
|
Appservice(AppserviceCommand),
|
|
|
|
/// - presence.rs iterators and getters
|
|
#[command(subcommand)]
|
|
Presence(PresenceCommand),
|
|
|
|
/// - rooms/alias.rs iterators and getters
|
|
#[command(subcommand)]
|
|
RoomAlias(RoomAliasCommand),
|
|
|
|
/// - rooms/state_cache iterators and getters
|
|
#[command(subcommand)]
|
|
RoomStateCache(RoomStateCacheCommand),
|
|
|
|
/// - rooms/timeline iterators and getters
|
|
#[command(subcommand)]
|
|
RoomTimeline(RoomTimelineCommand),
|
|
|
|
/// - globals.rs iterators and getters
|
|
#[command(subcommand)]
|
|
Globals(GlobalsCommand),
|
|
|
|
/// - sending.rs iterators and getters
|
|
#[command(subcommand)]
|
|
Sending(SendingCommand),
|
|
|
|
/// - users.rs iterators and getters
|
|
#[command(subcommand)]
|
|
Users(UsersCommand),
|
|
|
|
/// - resolver service
|
|
#[command(subcommand)]
|
|
Resolver(ResolverCommand),
|
|
|
|
/// - pusher service
|
|
#[command(subcommand)]
|
|
Pusher(PusherCommand),
|
|
|
|
/// - short service
|
|
#[command(subcommand)]
|
|
Short(ShortCommand),
|
|
|
|
/// - raw service
|
|
#[command(subcommand)]
|
|
Raw(RawCommand),
|
|
}
|