-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathflag.go
More file actions
139 lines (133 loc) · 3.45 KB
/
flag.go
File metadata and controls
139 lines (133 loc) · 3.45 KB
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
package main
import (
"github.com/renproject/darknode-cli/cmd/provider"
"github.com/urfave/cli"
)
// General flags
var (
NameFlag = cli.StringFlag{
Name: "name",
Usage: "A unique human-readable `string` for identifying the Darknode",
}
TagsFlag = cli.StringFlag{
Name: "tags",
Usage: "Multiple human-readable comma separated `strings` for identifying groups of Darknodes",
}
ScriptFlag = cli.StringFlag{
Name: "script",
Usage: "A `string` containing commands you want the Darknode to run",
}
NetworkFlag = cli.StringFlag{
Name: "network",
Value: "mainnet",
Usage: "Network of your Darknode (default: mainnet)",
}
AddressFlag = cli.StringFlag{
Name: "address",
Usage: "Ethereum address you want to withdraw the tokens to",
}
FileFlag = cli.StringFlag{
Name: "file",
Usage: "Path of the script file you want the Darknode to run",
}
ForceFlag = cli.BoolFlag{
Name: "force, f",
Usage: "Force destruction without interactive prompts",
}
VersionFlag = cli.StringFlag{
Name: "version",
Usage: "Version of darknode you want to upgrade to",
}
DowngradeFlag = cli.BoolFlag{
Name: "downgrade",
Usage: "Force downgrading to an older version without interactive prompts",
}
)
// AWS flags
var (
AwsFlag = cli.BoolFlag{
Name: provider.NameAws,
Usage: "AWS will be used to provision the Darknode",
}
AwsAccessKeyFlag = cli.StringFlag{
Name: "aws-access-key",
Usage: "AWS access `key` for programmatic access",
}
AwsSecretKeyFlag = cli.StringFlag{
Name: "aws-secret-key",
Usage: "AWS secret `key` for programmatic access",
}
AwsRegionFlag = cli.StringFlag{
Name: "aws-region",
Usage: "An optional AWS region (default: random)",
}
AwsInstanceFlag = cli.StringFlag{
Name: "aws-instance",
Value: "t3.micro",
Usage: "An optional AWS EC2 instance type (default: t3.micro)",
}
AwsProfileFlag = cli.StringFlag{
Name: "aws-profile",
Value: "default",
Usage: "Name of the profile containing the credentials",
}
)
// Digital ocean flags
var (
DoFlag = cli.BoolFlag{
Name: provider.NameDo,
Usage: "Digital Ocean will be used to provision the Darknode",
}
DoTokenFlag = cli.StringFlag{
Name: "do-token",
Usage: "Digital Ocean API token for programmatic access",
}
DoRegionFlag = cli.StringFlag{
Name: "do-region",
Usage: "An optional Digital Ocean region (default: random)",
}
DoSizeFlag = cli.StringFlag{
Name: "do-droplet",
Value: "s-1vcpu-1gb",
Usage: "An optional Digital Ocean droplet size (default: s-1vcpu-1gb)",
}
)
// Google cloud platform flags
var (
GcpFlag = cli.BoolFlag{
Name: provider.NameGcp,
Usage: "Google Cloud Platform will be used to provision the Darknode",
}
GcpCredFlag = cli.StringFlag{
Name: "gcp-credentials",
Usage: "Path of the Service Account credential file (JSON) to be used",
}
GcpMachineFlag = cli.StringFlag{
Name: "gcp-machine",
Value: "n1-standard-1",
Usage: "An optional Google Cloud machine type (default: n1-standard-1)",
}
GcpZoneFlag = cli.StringFlag{
Name: "gcp-zone",
Usage: "An optional Google Cloud Zone (default: random)",
}
)
// SSH flags
var (
SshFlag = cli.BoolFlag{
Name: provider.NameSsh,
Usage: "The darknode will be installed on an existing server with SSH",
}
SshUserFlag = cli.StringFlag{
Name: "ssh-user",
Usage: "SSH User",
}
SshHostnameFlag = cli.StringFlag{
Name: "ssh-hostname",
Usage: "SSH Hostname",
}
SshPrivateKeyFlag = cli.StringFlag{
Name: "ssh-private-key",
Usage: "SSH Private key",
}
)