-
Notifications
You must be signed in to change notification settings - Fork 0
/
commands.go
96 lines (93 loc) · 2.87 KB
/
commands.go
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
package podcmds
import (
"fmt"
"github.com/gookit/color"
"github.com/p9c/monorepo/pkg/opts/cmds"
"github.com/p9c/monorepo/pod/launchers"
"github.com/p9c/monorepo/version"
)
// GetCommands returns available subcommands in Parallelcoin Pod
func GetCommands() (c cmds.Commands) {
c = cmds.Commands{
{Name: "gui", Description:
"ParallelCoin GUI Wallet/Miner/Explorer",
Entrypoint: func(c interface{}) error { return nil },
Colorizer: color.Bit24(128, 255, 255, false).Sprint,
AppText: " gui",
},
{Name: "version", Description:
"print version and exit",
Entrypoint: func(c interface{}) error {
fmt.Println(version.Tag)
return nil
},
},
{Name: "ctl", Description:
"command line wallet and chain RPC client",
Entrypoint: launchers.CtlHandle,
Colorizer: color.Bit24(128, 255, 128, false).Sprint,
AppText: " ctl",
Commands: []cmds.Command{
{Name: "list", Description:
"list available commands",
Entrypoint: launchers.CtlHandleList,
},
},
},
{Name: "node", Description:
"ParallelCoin blockchain node",
Entrypoint: launchers.NodeHandle,
Colorizer: color.Bit24(128, 128, 255, false).Sprint,
AppText: " node",
Commands: []cmds.Command{
{Name: "dropaddrindex", Description:
"drop the address database index",
Entrypoint: func(c interface{}) error { return nil },
},
{Name: "droptxindex", Description:
"drop the transaction database index",
Entrypoint: func(c interface{}) error { return nil },
},
{Name: "dropcfindex", Description:
"drop the cfilter database index",
Entrypoint: func(c interface{}) error { return nil },
},
{Name: "dropindexes", Description:
"drop all of the indexes",
Entrypoint: func(c interface{}) error { return nil },
},
{Name: "resetchain", Description:
"deletes the current blockchain cache to force redownload",
Entrypoint: func(c interface{}) error { return nil },
},
},
},
{Name: "wallet", Description:
"run the wallet server (requires a chain node to function)",
Entrypoint: func(c interface{}) error { return nil },
Commands: []cmds.Command{
{Name: "drophistory", Description:
"reset the wallet transaction history",
Entrypoint: func(c interface{}) error { return nil },
},
},
Colorizer: color.Bit24(255, 255, 128, false).Sprint,
AppText: "wallet",
},
{Name: "kopach", Description:
"standalone multicast miner for easy mining farm deployment",
Entrypoint: func(c interface{}) error { return nil },
Colorizer: color.Bit24(255, 128, 128, false).Sprint,
AppText: "kopach",
},
{Name: "worker", Description:
"single thread worker process, normally started by kopach",
Entrypoint: func(c interface{}) error { return nil },
Colorizer: color.Bit24(255, 128, 255, false).Sprint,
AppText: "worker",
},
}
c.PopulateParents(nil)
// I.S(c)
return
}