Skip to main content

ProjectCommand

Enum ProjectCommand 

Source
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

§name: String

Project name

§title: Option<String>

Display title

§description: Option<String>

Long description

§parent: Option<String>

Parent project (inheritance)

§inheritable: bool

Mark this project eligible as a parent

§disabled: bool

Create the project disabled

§

Copy

Copy a project with all its resources

Fields

§src: String

Source project name

§dst: String

Destination name (must not exist)

§

Rename

Rename a project (native rename, not copy+delete)

Fields

§old_name: String

Current name

§new_name: String

New name

§

Set

Set project fields — –parent IS the inheritance move (reparent)

Fields

§name: String

Project name

§title: Option<String>

Display title

§description: Option<String>

Long description

§parent: Option<String>

Parent project (reparent)

§set_enabled: bool

Enable the project

§disabled: bool

Disable the project

§inheritable: Option<bool>

Whether this project may serve as a parent (true/false)

§

Delete

Delete a project — destructive, refused without –yes

Fields

§name: String

Project name

§

Export

Export a project as a ZIP archive (streams to disk)

Fields

§name: String

Project name

§output: Option<PathBuf>

Output file (default: the gateway’s Content-Disposition name, else .zip); with –decode-scripts, the output DIRECTORY (default -export/)

§decode_scripts: bool

Also decode embedded JSON scripts (Perspective view.json etc.) into editable <member>.<n>.py sidecars beside a copied member tree + scripts-manifest.json — the output is a DIRECTORY (script-python members are already plain .py and never decode; expressions pass through)

§

Import

Import a project from a ZIP archive

Fields

§name: String

Project name to import as

§file: String

ZIP 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: CollisionPolicy

Collision 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)

§encode_scripts: bool

–file points at a decoded export DIRECTORY (from export --decode-scripts): the sidecars are spliced back and the manifest stripped before the standard import path

§

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

§profile_a: String

Baseline profile (A)

§profile_b: String

Compared profile (B — the diff is B relative to A)

§project: String

Project name

§

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

Fields

§profile_a: String

Source profile (A)

§profile_b: String

Target profile (B)

§project: String

Project name

§resource: Vec<String>

Resource user path to promote (repeatable)

§all_changed: bool

Promote every resource the diff reports added or changed (never removed ones — deletion needs –delete)

§delete: bool

Also remove B’s resources the diff reports removed (default: upsert-only, nothing is ever deleted)

Trait Implementations§

Source§

impl Debug for ProjectCommand

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for ProjectCommand

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for ProjectCommand

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more