Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Dunitrust
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
46
Issues
46
List
Boards
Labels
Service Desk
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nodes
rust
Dunitrust
Commits
9f15159b
Commit
9f15159b
authored
Mar 24, 2019
by
Moul
Committed by
Éloïs
Mar 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ref] core: improve command line interface
parent
12aea3cb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
19 deletions
+19
-19
lib/core/core/cli/dbex.rs
lib/core/core/cli/dbex.rs
+4
-4
lib/core/core/cli/mod.rs
lib/core/core/cli/mod.rs
+11
-11
lib/core/core/cli/reset.rs
lib/core/core/cli/reset.rs
+3
-3
lib/modules/blockchain/blockchain/src/dbex.rs
lib/modules/blockchain/blockchain/src/dbex.rs
+1
-1
No files found.
lib/core/core/cli/dbex.rs
View file @
9f15159b
...
...
@@ -37,25 +37,25 @@ pub enum DbExSubCommand {
name
=
"distance"
,
raw(setting
=
"structopt::clap::AppSettings::ColoredHelp"
)
)]
///
durs databases explorer (distances datas)
///
Web of Trust distances explorer
DistanceOpt
(
DistanceOpt
),
#[structopt(
name
=
"members"
,
raw(setting
=
"structopt::clap::AppSettings::ColoredHelp"
)
)]
///
durs databases explorer (members datas)
///
Members explorer
MembersOpt
(
MembersOpt
),
#[structopt(
name
=
"member"
,
raw(setting
=
"structopt::clap::AppSettings::ColoredHelp"
)
)]
///
durs databases explorer (member datas)
///
Member explorer
MemberOpt
(
MemberOpt
),
#[structopt(
name
=
"balance"
,
raw(setting
=
"structopt::clap::AppSettings::ColoredHelp"
)
)]
///
durs databases explorer (balances datas)
///
Pubkeys’ balances explorer
BalanceOpt
(
BalanceOpt
),
}
...
...
lib/core/core/cli/mod.rs
View file @
9f15159b
...
...
@@ -37,11 +37,11 @@ use log::Level;
/// Rust implementation of Duniter
pub
struct
DursOpt
{
#[structopt(short
=
"p"
,
long
=
"profile"
)]
/// Set a custom user data
s
folder
/// Set a custom user data folder
profile_name
:
Option
<
String
>
,
#[structopt(short
=
"l"
,
long
=
"logs"
,
raw(next_line_help
=
"true"
))]
/// Set
the level of logs verbosity. (Default is
INFO).
///
Possible values
: [OFF, ERROR, WARN, INFO, DEBUG, TRACE]
/// Set
log level. (Defaults to
INFO).
///
Available levels
: [OFF, ERROR, WARN, INFO, DEBUG, TRACE]
logs_level
:
Option
<
Level
>
,
#[structopt(subcommand)]
/// CoreSubCommand
...
...
@@ -52,33 +52,33 @@ pub struct DursOpt {
/// Core cli subcommands
pub
enum
CoreSubCommand
{
#[structopt(name
=
"enable"
)]
/// Enable
some
module
/// Enable
a
module
EnableOpt
(
EnableOpt
),
#[structopt(name
=
"disable"
)]
/// Disable
some
module
/// Disable
a
module
DisableOpt
(
DisableOpt
),
#[structopt(name
=
"modules"
)]
///
list
modules
///
List available
modules
ListModulesOpt
(
ListModulesOpt
),
#[structopt(name
=
"start"
)]
///
start durs server
///
Start node
StartOpt
(
StartOpt
),
#[structopt(name
=
"sync"
)]
///
synchronization
///
Synchronize
SyncOpt
(
SyncOpt
),
///
r
eset data or conf or all
///
R
eset data or conf or all
#[structopt(
name
=
"reset"
,
raw(setting
=
"structopt::clap::AppSettings::ColoredHelp"
)
)]
ResetOpt
(
ResetOpt
),
///
durs databases
explorer
///
Database
explorer
#[structopt(
name
=
"dbex"
,
raw(setting
=
"structopt::clap::AppSettings::ColoredHelp"
)
)]
DbExOpt
(
DbExOpt
),
///
k
eys operations
///
K
eys operations
#[structopt(
name
=
"keys"
,
author
=
"inso <inso@tuta.io>"
,
...
...
lib/core/core/cli/reset.rs
View file @
9f15159b
...
...
@@ -19,9 +19,9 @@ use crate::cli::InvalidInput;
use
std
::
str
::
FromStr
;
#[derive(StructOpt,
Debug,
Copy,
Clone)]
///
start durs server
///
Reset data or configuration
pub
struct
ResetOpt
{
///
choose type datas to reset
///
Kind of data to be reseted: data, conf, all
pub
reset_type
:
ResetType
,
}
...
...
@@ -44,7 +44,7 @@ impl FromStr for ResetType {
"data"
=>
Ok
(
ResetType
::
Datas
),
"conf"
=>
Ok
(
ResetType
::
Conf
),
"all"
=>
Ok
(
ResetType
::
All
),
_
=>
Err
(
InvalidInput
(
"
Values accepted are
: data, conf, all."
)),
_
=>
Err
(
InvalidInput
(
"
Kind of data to be reseted
: data, conf, all."
)),
}
}
}
lib/modules/blockchain/blockchain/src/dbex.rs
View file @
9f15159b
...
...
@@ -89,7 +89,7 @@ pub fn dbex_tx<DC: DuniterConf>(profile: &str, conf: &DC, _csv: bool, query: &DB
{
pubkey
}
else
{
println!
(
"This address doesn't exist
!"
);
println!
(
"This address doesn't exist!"
);
return
;
};
let
address
=
UTXOConditionsGroup
::
Single
(
TransactionOutputCondition
::
Sig
(
pubkey
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment