Skip to main content

rocketmq_admin_core/cli/
commands.rs

1// Copyright 2023 The RocketMQ Rust Authors
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15//! CLI commands module
16//!
17//! This module contains refactored CLI command implementations that use
18//! core business logic. These are thin wrappers that handle:
19//! - Argument parsing (clap)
20//! - Input validation
21//! - Output formatting
22//! - Error display
23//!
24//! # Available Commands (New Architecture - Phase 1)
25//!
26//! ## Topic Commands
27//! - [`TopicClusterSubCommand`] - Get cluster list for a topic
28//! - [`DeleteTopicCommand`] - Delete a topic from cluster/broker
29//! - [`TopicRouteCommand`] - Query topic route information
30//! - [`UpdateTopicCommand`] - Create or update topic configuration
31//!
32//! ## NameServer Commands
33//! - [`GetNamesrvConfigCommand`] - Get NameServer configuration
34//! - [`UpdateNamesrvConfigCommand`] - Update NameServer configuration
35
36// Topic commands
37pub mod allocate_mq_command;
38pub mod delete_topic_command;
39pub mod topic_cluster_command;
40pub mod topic_list_command;
41pub mod topic_route_command;
42pub mod topic_status_command;
43pub mod update_order_conf_command;
44pub mod update_topic_command;
45pub mod update_topic_perm_command;
46
47// NameServer commands
48pub mod add_write_perm_command;
49pub mod delete_kv_config_command;
50pub mod get_namesrv_config_command;
51pub mod update_kv_config_command;
52pub mod update_namesrv_config_command;
53pub mod wipe_write_perm_command;
54
55// Broker commands
56pub mod switch_timer_engine_command;
57
58// Re-export command structs for convenience
59pub use self::add_write_perm_command::AddWritePermCommand;
60pub use self::allocate_mq_command::AllocateMqCommand;
61pub use self::delete_kv_config_command::DeleteKvConfigCommand;
62pub use self::delete_topic_command::DeleteTopicCommand;
63pub use self::get_namesrv_config_command::GetNamesrvConfigCommand;
64pub use self::switch_timer_engine_command::SwitchTimerEngineCommand;
65pub use self::topic_cluster_command::TopicClusterSubCommand;
66pub use self::topic_list_command::TopicListCommand;
67pub use self::topic_route_command::TopicRouteCommand;
68pub use self::topic_status_command::TopicStatusCommand;
69pub use self::update_kv_config_command::UpdateKvConfigCommand;
70pub use self::update_namesrv_config_command::UpdateNamesrvConfigCommand;
71pub use self::update_order_conf_command::UpdateOrderConfCommand;
72pub use self::update_topic_command::UpdateTopicCommand;
73pub use self::update_topic_perm_command::UpdateTopicPermCommand;
74pub use self::wipe_write_perm_command::WipeWritePermCommand;