pub enum RegistryCommand {
Init {
dir: PathBuf,
id: String,
key_out: Option<PathBuf>,
},
Add {
dir: PathBuf,
package: PathBuf,
key: PathBuf,
},
Serve {
dir: PathBuf,
key: PathBuf,
tokens: PathBuf,
listen: String,
},
Rotate {
dir: PathBuf,
key: PathBuf,
key_out: PathBuf,
},
Delegate {
dir: PathBuf,
key: PathBuf,
delegate_out: PathBuf,
},
Revoke {
dir: PathBuf,
target: String,
key: PathBuf,
force: bool,
},
Resign {
dir: PathBuf,
key: PathBuf,
},
Conformance {
index: String,
org: Option<String>,
name: String,
key: Option<String>,
read_only: bool,
package: Option<String>,
narrow_token_env: Option<String>,
max_upload: u64,
format: DeployFormatArg,
},
Token {
tokens: PathBuf,
organisations: Vec<String>,
can: Vec<String>,
},
Yank {
dir: PathBuf,
package: String,
version: String,
undo: bool,
},
Withdraw {
dir: PathBuf,
package: String,
version: String,
reason: String,
},
}Expand description
#2274: bynk registry subcommands.
Variants§
Init
Create a registry: its config.json, and a signing key written outside
the directory. Prints the key = "…" line consumers pin.
Fields
Add
Pack a package, sign its index line, and add it to the registry.
Fields
Serve
Serve a registry directory with the publish API (#2287): plain HTTP, loopback by default — put a TLS-terminating proxy in front to serve beyond this machine.
Fields
Rotate
Append a link to the registry’s key chain (#2316): a new key, signed by the current chain key. Clients that trust an older key follow it.
Fields
Delegate
Delegate signing to a new key (#2316): it may sign index lines, and
nothing else. Use it as serve’s or add’s --key, keeping the chain
key offline.
Fields
Revoke
Revoke a delegated key (#2316): lines it signed are refused from then
on, so re-sign them with another key first (resign).
Fields
Resign
Re-sign every index line with a key (#2316): the newest chain key or a
valid delegate. Only each line’s sig changes.
Conformance
Check a registry against the protocol (#2311): every observable rule a
server must keep, run against its URL. A full run publishes one
throwaway package under --org and leaves it yanked; --read-only
publishes nothing.
Fields
name: StringThe registry name the token is found under
(BYNK_REGISTRY_<NAME>_TOKEN, or the credentials file).
key: Option<String>The registry’s key to pin (ed25519:…); trusted on first use for
the run otherwise.
narrow_token_env: Option<String>An environment variable holding a token that can’t act for
--org, for the auth.scope check (skipped without one).
format: DeployFormatArgOutput format.
Token
Mint a publish token for bynk registry serve (#2287): printed once;
only its hash is stored in the tokens file.
Fields
Yank
Mark a version yanked — kept for locked builds, never newly chosen.
Fields
Withdraw
Withdraw a version (#2330): a takedown. Yanks its line, records the reason clients print, and deletes its archive. Final — there is no undo.
Trait Implementations§
Source§impl Debug for RegistryCommand
impl Debug for RegistryCommand
Source§impl FromArgMatches for RegistryCommand
impl FromArgMatches for RegistryCommand
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 RegistryCommand
impl Subcommand for RegistryCommand
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 subcommandAuto Trait Implementations§
impl Freeze for RegistryCommand
impl RefUnwindSafe for RegistryCommand
impl Send for RegistryCommand
impl Sync for RegistryCommand
impl Unpin for RegistryCommand
impl UnsafeUnpin for RegistryCommand
impl UnwindSafe for RegistryCommand
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling [Attribute] value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi [Quirk] value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the [Condition] value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);