reactive_graph_tooling/tooling/instances/repositories/
args.rs1use crate::tooling::instances::args::ChownArgs;
2use crate::tooling::instances::repositories::commands::RepositoriesCommands;
3use clap::Parser;
4
5#[derive(Parser, Debug)]
6pub struct RepositoriesArgs {
7 #[command(subcommand)]
8 pub commands: RepositoriesCommands,
9}
10
11#[derive(Parser, Debug)]
12pub struct InitRepositoryArgs {
13 pub local_name: String,
15
16 pub url: Option<String>,
18
19 #[clap(flatten)]
20 pub chown: ChownArgs,
21}
22
23impl InitRepositoryArgs {
24 pub fn chown(self, chown: ChownArgs) -> Self {
25 Self {
26 local_name: self.local_name,
27 url: self.url,
28 chown,
29 }
30 }
31}
32
33impl Default for InitRepositoryArgs {
34 fn default() -> Self {
35 InitRepositoryArgs {
36 local_name: "default".to_string(),
37 url: None,
38 chown: ChownArgs::default(),
39 }
40 }
41}
42
43#[derive(Parser, Debug)]
44pub struct DeleteRepositoryArgs {
45 pub local_name: String,
47
48 pub force: Option<bool>,
50}