pub enum ProjectCommand {
List,
New {
name: String,
title: Option<String>,
description: Option<String>,
parent: Option<String>,
inheritable: bool,
disabled: bool,
},
Copy {
src: String,
dst: String,
},
Rename {
old_name: String,
new_name: String,
},
Set {
name: String,
title: Option<String>,
description: Option<String>,
parent: Option<String>,
set_enabled: bool,
disabled: bool,
inheritable: Option<bool>,
},
Delete {
name: String,
},
Export {
name: String,
output: Option<PathBuf>,
decode_scripts: bool,
},
Import {
name: String,
file: String,
collision_policy: CollisionPolicy,
encode_scripts: bool,
},
Diff {
profile_a: String,
profile_b: String,
project: String,
},
Sync {
profile_a: String,
profile_b: String,
project: String,
resource: Vec<String>,
all_changed: bool,
delete: bool,
},
}Variants§
List
List every runnable project: name, title, enabled, parent, inheritable (inheritance info from the items themselves)
New
Create a project (only provided fields ride the create body)
Fields
Copy
Copy a project with all its resources
Rename
Rename a project (native rename, not copy+delete)
Set
Set project fields — –parent IS the inheritance move (reparent)
Fields
Delete
Delete a project — destructive, refused without –yes
Export
Export a project as a ZIP archive (streams to disk)
Fields
Import
Import a project from a ZIP archive
Fields
file: StringZIP file path, or - to read the archive from stdin; with –encode-scripts, a decoded export DIRECTORY (re-zipped with the sidecars spliced back before upload; stdin is invalid in that mode)
collision_policy: CollisionPolicyCollision policy: abort refuses when the name exists (default); overwrite REPLACES the entire project — destructive, requires –yes. merge is Designer-only (not a value; the README documents why)
Diff
Compare a project across two gateway profiles — statuses are
B-relative-to-A (added = in B only, removed = in A only,
changed = differing after resource.json normalization)
Fields
Sync
Promote selected resources from profile A into profile B (direction is ALWAYS A→B) — destructive on B: the whole project is overwrite-imported, refused without –yes
Trait Implementations§
Source§impl Debug for ProjectCommand
impl Debug for ProjectCommand
Source§impl FromArgMatches for ProjectCommand
impl FromArgMatches for ProjectCommand
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for ProjectCommand
impl Subcommand for ProjectCommand
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand