Skip to main content

tuwunel_admin/appservice/
mod.rs

1mod list;
2mod register;
3mod show_config;
4mod unregister;
5
6use clap::Subcommand;
7use tuwunel_core::Result;
8
9use crate::admin_command_dispatch;
10
11#[derive(Debug, Subcommand)]
12#[admin_command_dispatch(handler_prefix = "appservice")]
13pub(super) enum AppserviceCommand {
14	/// - Register an appservice using its registration YAML
15	///
16	/// This command needs a YAML generated by an appservice (such as a bridge),
17	/// which must be provided in a Markdown code block below the command.
18	///
19	/// Registering a new bridge using the ID of an existing bridge replaces the
20	/// old one; an ID from the server configuration or `appservice_dir` is
21	/// refused.
22	Register,
23
24	/// - Unregister an appservice using its ID
25	///
26	/// You can find the ID using the `list-appservices` command.
27	Unregister {
28		/// The appservice to unregister
29		appservice_identifier: String,
30	},
31
32	/// - Show an appservice's config using its ID
33	///
34	/// You can find the ID using the `list-appservices` command.
35	#[clap(alias("show"))]
36	ShowConfig {
37		/// The appservice to show
38		appservice_identifier: String,
39	},
40
41	/// - List all the currently registered appservices
42	List,
43}