1use std::path::PathBuf;
4
5use clap::{Args, Subcommand};
6
7#[derive(Args)]
8pub struct VerificationArgs {
9 #[arg(long = "type")]
11 pub(crate) verification_type: i32,
12 #[arg(long)]
14 pub(crate) op: i32,
15 #[arg(long)]
17 pub(crate) code: Option<String>,
18}
19
20#[derive(Args)]
21pub struct QuoteRightsArgs {
22 #[arg(long)]
24 pub(crate) refresh: bool,
25}
26
27#[derive(Args)]
28pub struct QuoteCapabilityArgs {
29 #[arg(index = 1, value_name = "SYMBOL")]
31 pub(crate) symbol_positional: Option<String>,
32
33 #[arg(
35 long = "symbol",
36 visible_aliases = ["code", "stock"],
37 conflicts_with = "symbol_positional",
38 value_name = "SYMBOL"
39 )]
40 pub(crate) symbol_arg: Option<String>,
41}
42
43#[derive(Args)]
44pub struct TickerStatisticArgs {
45 #[arg(index = 1, value_name = "SYMBOL")]
47 pub(crate) symbol_pos: Option<String>,
48
49 #[arg(long = "symbol", conflicts_with = "symbol_pos")]
51 pub(crate) symbol: Option<String>,
52
53 #[arg(long)]
55 pub(crate) ticker_type: Option<i32>,
56
57 #[arg(long)]
59 pub(crate) stat_type: Option<u32>,
60}
61
62#[derive(Args)]
63pub struct TickerStatisticDetailArgs {
64 #[arg(index = 1, value_name = "SYMBOL")]
66 pub(crate) symbol_pos: Option<String>,
67
68 #[arg(long = "symbol", conflicts_with = "symbol_pos")]
70 pub(crate) symbol: Option<String>,
71
72 #[arg(long)]
74 pub(crate) ticker_type: Option<i32>,
75
76 #[arg(long)]
78 pub(crate) ticker_time: Option<u64>,
79
80 #[arg(long)]
82 pub(crate) select_num: Option<u32>,
83
84 #[arg(long)]
86 pub(crate) data_from: Option<u32>,
87
88 #[arg(long)]
90 pub(crate) data_max_count: Option<u32>,
91
92 #[arg(long)]
94 pub(crate) stat_type: Option<u32>,
95}
96
97#[derive(Args)]
98pub struct QuerySubscriptionArgs {
99 #[arg(long)]
101 pub(crate) all_conn: bool,
102}
103
104#[derive(Args)]
105pub struct UnsubscribeArgs {
106 #[arg(long, default_value = "")]
108 pub(crate) symbols: String,
109
110 #[arg(long, default_value = "")]
116 pub(crate) sub_types: String,
117
118 #[arg(long)]
120 pub(crate) all: bool,
121}
122
123#[derive(Args)]
124pub struct HistoryKlQuotaArgs {
125 #[arg(long)]
127 pub(crate) detail: bool,
128}
129
130#[derive(Args)]
131pub struct DaemonStatusArgs {
132 #[arg(long)]
134 pub(crate) rest_url: Option<String>,
135
136 #[arg(long, conflicts_with = "rest_url")]
138 pub(crate) rest_port: Option<u16>,
139
140 #[arg(long)]
142 pub(crate) api_key: Option<String>,
143}
144
145#[derive(Args)]
146pub struct PushSubscriberInfoArgs {
147 #[arg(long)]
149 pub(crate) rest_url: Option<String>,
150
151 #[arg(long, conflicts_with = "rest_url")]
153 pub(crate) rest_port: Option<u16>,
154
155 #[arg(long)]
157 pub(crate) api_key: Option<String>,
158}
159
160#[derive(Args)]
161pub struct DoctorArgs {
162 #[arg(long)]
164 pub(crate) rest_url: Option<String>,
165
166 #[arg(long, conflicts_with = "rest_url")]
168 pub(crate) rest_port: Option<u16>,
169
170 #[arg(long)]
172 pub(crate) api_key: Option<String>,
173
174 #[arg(long)]
177 pub(crate) symbol: Option<String>,
178
179 #[arg(long, value_name = "DIR")]
181 pub(crate) bundle: Option<PathBuf>,
182
183 #[arg(long)]
185 pub(crate) no_update_check: bool,
186
187 #[arg(long)]
189 pub(crate) update_url: Option<String>,
190
191 #[arg(long, default_value_t = 800)]
193 pub(crate) update_timeout_ms: u64,
194}
195
196#[derive(Args)]
197pub struct VersionArgs {
198 #[arg(long)]
200 pub(crate) check: bool,
201
202 #[arg(long)]
204 pub(crate) url: Option<String>,
205
206 #[arg(long, default_value_t = 800)]
208 pub(crate) timeout_ms: u64,
209}
210
211#[derive(Args)]
212pub struct LanguagePackArgs {
213 #[command(subcommand)]
214 pub(crate) command: LanguagePackCommand,
215}
216
217#[derive(Subcommand)]
218pub enum LanguagePackCommand {
219 Status {
221 #[arg(long, value_name = "DIR")]
223 cache_dir: Option<PathBuf>,
224 },
225 Import {
227 #[arg(long, value_name = "DIR")]
229 dir: PathBuf,
230
231 #[arg(long, value_name = "DIR")]
233 cache_dir: Option<PathBuf>,
234
235 #[arg(long, default_value = "manual-import")]
237 pack_version: String,
238
239 #[arg(long, default_value = "manual-import")]
241 source: String,
242
243 #[arg(long)]
245 profile: Option<String>,
246 },
247 Update {
249 #[arg(long, value_name = "URL")]
251 endpoint: String,
252
253 #[arg(long, value_name = "DIR")]
255 cache_dir: Option<PathBuf>,
256
257 #[arg(long, default_value_t = 3000)]
259 timeout_ms: u64,
260
261 #[arg(long)]
263 lang: Option<String>,
264 },
265}
266
267#[derive(Args)]
268pub struct StaticStatusArgs {
269 #[arg(long)]
271 pub(crate) rest_url: Option<String>,
272
273 #[arg(long, conflicts_with = "rest_url")]
275 pub(crate) rest_port: Option<u16>,
276
277 #[arg(long)]
279 pub(crate) api_key: Option<String>,
280}
281
282#[derive(Args)]
283pub struct StaticWarmupArgs {
284 #[arg(required = true)]
286 pub(crate) symbols: Vec<String>,
287}
288
289#[derive(Args)]
290pub struct SurfaceArgs {
291 #[arg(long)]
293 pub(crate) gaps: bool,
294
295 #[arg(long, value_name = "ENDPOINT")]
297 pub(crate) checklist: Option<String>,
298}
299
300#[derive(Args)]
301pub struct DaemonShutdownArgs {
302 #[arg(long)]
304 pub(crate) rest_url: Option<String>,
305
306 #[arg(long, conflicts_with = "rest_url")]
308 pub(crate) rest_port: Option<u16>,
309
310 #[arg(long)]
312 pub(crate) api_key: Option<String>,
313}
314
315#[derive(Args)]
316pub struct DaemonReloadArgs {
317 #[arg(long)]
319 pub(crate) rest_url: Option<String>,
320
321 #[arg(long, conflicts_with = "rest_url")]
323 pub(crate) rest_port: Option<u16>,
324
325 #[arg(long)]
327 pub(crate) api_key: Option<String>,
328}