@@ -10,30 +10,30 @@ pub struct Client {
10
10
}
11
11
12
12
#[ derive( Debug ) ]
13
- pub enum SnapshotCommand {
13
+ pub enum CardanoDbCommand {
14
14
List ( ) ,
15
15
Show { digest : String } ,
16
16
Download { digest : String } ,
17
17
}
18
18
19
- impl SnapshotCommand {
19
+ impl CardanoDbCommand {
20
20
fn name ( & self ) -> String {
21
21
match self {
22
- SnapshotCommand :: List ( ) => "list" . to_string ( ) ,
23
- SnapshotCommand :: Show { digest } => format ! ( "show-{digest}" ) ,
24
- SnapshotCommand :: Download { digest } => format ! ( "download-{digest}" ) ,
22
+ CardanoDbCommand :: List ( ) => "list" . to_string ( ) ,
23
+ CardanoDbCommand :: Show { digest } => format ! ( "show-{digest}" ) ,
24
+ CardanoDbCommand :: Download { digest } => format ! ( "download-{digest}" ) ,
25
25
}
26
26
}
27
27
28
28
fn cli_arg ( & self ) -> Vec < String > {
29
29
match self {
30
- SnapshotCommand :: List ( ) => {
31
- vec ! [ "list" . to_string( ) ]
30
+ CardanoDbCommand :: List ( ) => {
31
+ vec ! [ "snapshot" . to_string ( ) , " list". to_string( ) ]
32
32
}
33
- SnapshotCommand :: Show { digest } => {
34
- vec ! [ "show" . to_string( ) , digest. clone( ) ]
33
+ CardanoDbCommand :: Show { digest } => {
34
+ vec ! [ "snapshot" . to_string ( ) , " show". to_string( ) , digest. clone( ) ]
35
35
}
36
- SnapshotCommand :: Download { digest } => {
36
+ CardanoDbCommand :: Download { digest } => {
37
37
vec ! [ "download" . to_string( ) , digest. clone( ) ]
38
38
}
39
39
}
@@ -105,15 +105,15 @@ impl CardanoTransactionCommand {
105
105
106
106
#[ derive( Debug ) ]
107
107
pub enum ClientCommand {
108
- Snapshot ( SnapshotCommand ) ,
108
+ CardanoDb ( CardanoDbCommand ) ,
109
109
MithrilStakeDistribution ( MithrilStakeDistributionCommand ) ,
110
110
CardanoTransaction ( CardanoTransactionCommand ) ,
111
111
}
112
112
113
113
impl ClientCommand {
114
114
fn name ( & self ) -> String {
115
115
match self {
116
- ClientCommand :: Snapshot ( cmd) => format ! ( "snapshot -{}" , cmd. name( ) ) ,
116
+ ClientCommand :: CardanoDb ( cmd) => format ! ( "cardano-db -{}" , cmd. name( ) ) ,
117
117
ClientCommand :: MithrilStakeDistribution ( cmd) => {
118
118
format ! ( "msd-{}" , cmd. name( ) )
119
119
}
@@ -125,7 +125,9 @@ impl ClientCommand {
125
125
126
126
fn cli_arg ( & self ) -> Vec < String > {
127
127
let mut args = match self {
128
- ClientCommand :: Snapshot ( cmd) => [ vec ! [ "snapshot" . to_string( ) ] , cmd. cli_arg ( ) ] . concat ( ) ,
128
+ ClientCommand :: CardanoDb ( cmd) => {
129
+ [ vec ! [ "cardano-db" . to_string( ) ] , cmd. cli_arg ( ) ] . concat ( )
130
+ }
129
131
ClientCommand :: MithrilStakeDistribution ( cmd) => [
130
132
vec ! [ "mithril-stake-distribution" . to_string( ) ] ,
131
133
cmd. cli_arg ( ) ,
0 commit comments