pub enum DocCommands {
Show 15 variants
Switch {
id: NamespaceId,
},
Create {
switch: bool,
},
Join {
ticket: DocTicket,
switch: bool,
},
List,
Share {
doc: Option<NamespaceId>,
mode: ShareMode,
addr_options: AddrInfoOptions,
},
Set {
doc: Option<NamespaceId>,
author: Option<AuthorId>,
key: String,
value: String,
},
DlPolicy(DlPolicyCmd),
Get {
doc: Option<NamespaceId>,
key: String,
prefix: bool,
author: Option<AuthorId>,
mode: DisplayContentMode,
},
Del {
doc: Option<NamespaceId>,
author: Option<AuthorId>,
prefix: String,
},
Keys {
doc: Option<NamespaceId>,
author: Option<AuthorId>,
prefix: Option<String>,
sort: Sorting,
desc: bool,
mode: DisplayContentMode,
},
Import {
doc: Option<NamespaceId>,
author: Option<AuthorId>,
prefix: Option<String>,
path: String,
in_place: bool,
no_prompt: bool,
},
Export {
doc: Option<NamespaceId>,
key: String,
out: String,
},
Watch {
doc: Option<NamespaceId>,
},
Leave {
doc: Option<NamespaceId>,
},
Drop {
doc: Option<NamespaceId>,
},
}
cli
only.Expand description
Possible Document
commands.
Variants§
Switch
Set the active document (only works within the Iroh console).
Fields
id: NamespaceId
Create
Create a new document.
Join
Join a document from a ticket.
List
List documents.
Share a document with peers.
Set
Set an entry in a document.
Fields
doc: Option<NamespaceId>
Document to operate on.
Required unless the document is set through the IROH_DOC environment variable.
Within the Iroh console, the active document can also set with doc switch
.
Author of the entry.
Required unless the author is set through the IROH_AUTHOR environment variable.
Within the Iroh console, the active author can also set with author switch
.
DlPolicy(DlPolicyCmd)
Set the download policies for a document.
Get
Get entries in a document.
Shows the author, content hash and content length for all entries for this key.
Fields
doc: Option<NamespaceId>
Document to operate on.
Required unless the document is set through the IROH_DOC environment variable.
Within the Iroh console, the active document can also set with doc switch
.
Filter by author.
mode: DisplayContentMode
How to show the contents of the key.
Del
Delete all entries below a key prefix.
Fields
doc: Option<NamespaceId>
Document to operate on.
Required unless the document is set through the IROH_DOC environment variable.
Within the Iroh console, the active document can also set with doc switch
.
Author of the entry.
Required unless the author is set through the IROH_AUTHOR environment variable.
Within the Iroh console, the active author can also set with author switch
.
Keys
List all keys in a document.
Fields
doc: Option<NamespaceId>
Document to operate on.
Required unless the document is set through the IROH_DOC environment variable.
Within the Iroh console, the active document can also set with doc switch
.
Filter by author.
mode: DisplayContentMode
How to show the contents of the keys.
Import
Import data into a document
Fields
doc: Option<NamespaceId>
Document to operate on.
Required unless the document is set through the IROH_DOC environment variable.
Within the Iroh console, the active document can also be set with doc switch
.
Author of the entry.
Required unless the author is set through the IROH_AUTHOR environment variable.
Within the Iroh console, the active author can also be set with author switch
.
prefix: Option<String>
Prefix to add to imported entries (parsed as UTF-8 string). Defaults to no prefix
Export
Export the most recent data for a key from a document
Fields
doc: Option<NamespaceId>
Document to operate on.
Required unless the document is set through the IROH_DOC environment variable.
Within the Iroh console, the active document can also be set with doc switch
.
Watch
Watch for changes and events on a document
Fields
doc: Option<NamespaceId>
Document to operate on.
Required unless the document is set through the IROH_DOC environment variable.
Within the Iroh console, the active document can also set with doc switch
.
Leave
Stop syncing a document.
Fields
doc: Option<NamespaceId>
Document to operate on.
Required unless the document is set through the IROH_DOC environment variable.
Within the Iroh console, the active document can also set with doc switch
.
Drop
Delete a document from the local node.
This is a destructive operation. Both the document secret key and all entries in the document will be permanently deleted from the node’s storage. Content blobs will be deleted through garbage collection unless they are referenced from another document or tag.
Fields
doc: Option<NamespaceId>
Document to operate on.
Required unless the document is set through the IROH_DOC environment variable.
Within the Iroh console, the active document can also set with doc switch
.
Implementations§
Source§impl DocCommands
impl DocCommands
Trait Implementations§
Source§impl Clone for DocCommands
impl Clone for DocCommands
Source§fn clone(&self) -> DocCommands
fn clone(&self) -> DocCommands
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl CommandFactory for DocCommands
impl CommandFactory for DocCommands
Source§impl Debug for DocCommands
impl Debug for DocCommands
Source§impl FromArgMatches for DocCommands
impl FromArgMatches for DocCommands
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 Parser for DocCommands
impl Parser for DocCommands
§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
§fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
Source§impl Subcommand for DocCommands
impl Subcommand for DocCommands
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