1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
use structopt::StructOpt;

use crate::ServiceIdentifier;

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, StructOpt)]
pub enum DebugCommands {
    #[structopt(name = "datastore")]
    /// Datastore debug commands
    Datastore(DatastoreCommands),

    #[structopt(name = "dht")]
    /// Datastore debug commands
    Dht(DhtCommands),

    #[structopt(name = "update")]
    /// Force an update of the daemon
    Update,

    #[structopt(name = "bootstrap")]
    /// Invoke bootstrapping
    Bootstrap,
}

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, StructOpt)]
pub enum DatastoreCommands {}

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, StructOpt)]
pub enum DhtCommands {
    #[structopt(name = "peer")]
    /// Find a peer with a given ID
    Peer(ServiceIdentifier),

    #[structopt(name = "data")]
    /// Find data at a certain ID
    Data(ServiceIdentifier),
}