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 will replace
20 /// the old one.
21 Register,
22
23 /// - Unregister an appservice using its ID
24 ///
25 /// You can find the ID using the `list-appservices` command.
26 Unregister {
27 /// The appservice to unregister
28 appservice_identifier: String,
29 },
30
31 /// - Show an appservice's config using its ID
32 ///
33 /// You can find the ID using the `list-appservices` command.
34 #[clap(alias("show"))]
35 ShowConfig {
36 /// The appservice to show
37 appservice_identifier: String,
38 },
39
40 /// - List all the currently registered appservices
41 List,
42}