diff --git a/src/service/admin/mod.rs b/src/service/admin/mod.rs index c066c42c..7983cd36 100644 --- a/src/service/admin/mod.rs +++ b/src/service/admin/mod.rs @@ -49,37 +49,37 @@ const PAGE_SIZE: usize = 100; #[command(name = "@conduit:server.name:", version = env!("CARGO_PKG_VERSION"))] enum AdminCommand { #[command(subcommand)] - /// Commands for managing appservices + /// - Commands for managing appservices Appservices(AppserviceCommand), #[command(subcommand)] - /// Commands for managing local users + /// - Commands for managing local users Users(UserCommand), #[command(subcommand)] - /// Commands for managing rooms + /// - Commands for managing rooms Rooms(RoomCommand), #[command(subcommand)] - /// Commands for managing federation + /// - Commands for managing federation Federation(FederationCommand), #[command(subcommand)] - /// Commands for managing the server + /// - Commands for managing the server Server(ServerCommand), #[command(subcommand)] // TODO: should i split out debug commands to a separate thing? the // debug commands seem like they could fit in the other categories fine // this is more like a "miscellaneous" category than a debug one - /// Commands for debugging things + /// - Commands for debugging things Debug(DebugCommand), } #[cfg_attr(test, derive(Debug))] #[derive(Subcommand)] enum AppserviceCommand { - /// Register an appservice using its registration YAML + /// - Register an appservice using its registration YAML /// /// This command needs a YAML generated by an appservice (such as a bridge), /// which must be provided in a Markdown code block below the command. @@ -88,7 +88,7 @@ enum AppserviceCommand { /// the old one. Register, - /// Unregister an appservice using its ID + /// - Unregister an appservice using its ID /// /// You can find the ID using the `list-appservices` command. Unregister { @@ -96,7 +96,7 @@ enum AppserviceCommand { appservice_identifier: String, }, - /// Show an appservice's config using its ID + /// - Show an appservice's config using its ID /// /// You can find the ID using the `list-appservices` command. Show { @@ -104,14 +104,14 @@ enum AppserviceCommand { appservice_identifier: String, }, - /// List all the currently registered appservices + /// - List all the currently registered appservices List, } #[cfg_attr(test, derive(Debug))] #[derive(Subcommand)] enum UserCommand { - /// Create a new user + /// - Create a new user Create { /// Username of the new user username: String, @@ -119,13 +119,13 @@ enum UserCommand { password: Option, }, - /// Reset user password + /// - Reset user password ResetPassword { /// Username of the user for whom the password should be reset username: String, }, - /// Deactivate a user + /// - Deactivate a user /// /// User will not be removed from all rooms by default. /// Use --leave-rooms to force the user to leave all rooms @@ -135,7 +135,7 @@ enum UserCommand { user_id: Box, }, - /// Deactivate a list of users + /// - Deactivate a list of users /// /// Recommended to use in conjunction with list-local-users. /// @@ -155,29 +155,29 @@ enum UserCommand { force: bool, }, - /// List local users in the database + /// - List local users in the database List, } #[cfg_attr(test, derive(Debug))] #[derive(Subcommand)] enum RoomCommand { - /// List all rooms the server knows about + /// - List all rooms the server knows about List { page: Option }, #[command(subcommand)] - /// Manage rooms' aliases + /// - Manage rooms' aliases Alias(RoomAliasCommand), #[command(subcommand)] - /// Manage the room directory + /// - Manage the room directory Directory(RoomDirectoryCommand), } #[cfg_attr(test, derive(Debug))] #[derive(Subcommand)] enum RoomAliasCommand { - /// Make an alias point to a room. + /// - Make an alias point to a room. Set { #[arg(short, long)] /// Set the alias even if a room is already using it @@ -190,19 +190,19 @@ enum RoomAliasCommand { room_alias_localpart: String, }, - /// Remove an alias + /// - Remove an alias Remove { /// The alias localpart to remove (`alias`, not `#alias:servername.tld`) room_alias_localpart: String, }, - /// Show which room is using an alias + /// - Show which room is using an alias Which { /// The alias localpart to look up (`alias`, not `#alias:servername.tld`) room_alias_localpart: String, }, - /// List aliases currently being used + /// - List aliases currently being used List { /// If set, only list the aliases for this room room_id: Option>, @@ -212,41 +212,41 @@ enum RoomAliasCommand { #[cfg_attr(test, derive(Debug))] #[derive(Subcommand)] enum RoomDirectoryCommand { - /// Publish a room to the room directory + /// - Publish a room to the room directory Publish { /// The room id of the room to publish room_id: Box, }, - /// Unpublish a room to the room directory + /// - Unpublish a room to the room directory Unpublish { /// The room id of the room to unpublish room_id: Box, }, - /// List rooms that are published + /// - List rooms that are published List { page: Option }, } #[cfg_attr(test, derive(Debug))] #[derive(Subcommand)] enum FederationCommand { - /// List all rooms we are currently handling an incoming pdu from + /// - List all rooms we are currently handling an incoming pdu from IncomingFederation, - /// Disables incoming federation handling for a room. + /// - Disables incoming federation handling for a room. DisableRoom { room_id: Box }, - /// Enables incoming federation handling for a room again. + /// - Enables incoming federation handling for a room again. EnableRoom { room_id: Box }, - /// Verify json signatures + /// - Verify json signatures /// /// This command needs a JSON blob provided in a Markdown code block below /// the command. SignJson, - /// Verify json signatures + /// - Verify json signatures /// /// This command needs a JSON blob provided in a Markdown code block below /// the command. @@ -256,13 +256,13 @@ enum FederationCommand { #[cfg_attr(test, derive(Debug))] #[derive(Subcommand)] enum DebugCommand { - /// Get the auth_chain of a PDU + /// - Get the auth_chain of a PDU GetAuthChain { /// An event ID (the $ character followed by the base64 reference hash) event_id: Box, }, - /// Parse and print a PDU from a JSON + /// - Parse and print a PDU from a JSON /// /// The PDU event is only checked for validity and is not added to the /// database. @@ -271,7 +271,7 @@ enum DebugCommand { /// the command. ParsePdu, - /// Retrieve and print a PDU by ID from the Conduit database + /// - Retrieve and print a PDU by ID from the Conduit database GetPdu { /// An event ID (a $ followed by the base64 reference hash) event_id: Box, @@ -283,16 +283,16 @@ enum DebugCommand { #[cfg_attr(test, derive(Debug))] #[derive(Subcommand)] enum ServerCommand { - /// Show configuration values + /// - Show configuration values ShowConfig, - /// Print database memory usage statistics + /// - Print database memory usage statistics MemoryUsage, - /// Clears all of Conduit's database caches with index smaller than the amount + /// - Clears all of Conduit's database caches with index smaller than the amount ClearDatabaseCaches { amount: u32 }, - /// Clears all of Conduit's service caches with index smaller than the amount + /// - Clears all of Conduit's service caches with index smaller than the amount ClearServiceCaches { amount: u32 }, }