forked from cloudfoundry/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharguments.go
410 lines (326 loc) · 19 KB
/
arguments.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
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
package flag
type AppName struct {
AppName string `positional-arg-name:"APP_NAME" required:"true" description:"The application name"`
}
type OptionalAppName struct {
AppName string `positional-arg-name:"APP_NAME" description:"The application name"`
}
type AppDroplet struct {
AppName string `positional-arg-name:"APP_NAME" required:"true" description:"The application name"`
DropletGUID string `positional-arg-name:"DROPLET_GUID" required:"true" description:"The droplet guid"`
}
type BuildpackName struct {
Buildpack string `positional-arg-name:"BUILDPACK" required:"true" description:"The buildpack"`
}
type CommandName struct {
CommandName string `positional-arg-name:"COMMAND_NAME" description:"The command name"`
}
type Domain struct {
Domain string `positional-arg-name:"DOMAIN" required:"true" description:"The domain"`
}
type Feature struct {
Feature string `positional-arg-name:"FEATURE_NAME" required:"true" description:"The feature flag name"`
}
type ParamsAsJSON struct {
JSON string `positional-arg-name:"JSON" required:"true" description:"Parameters as JSON"`
}
type ServiceOffering struct {
ServiceOffering string `positional-arg-name:"SERVICE_OFFERING" required:"true" description:"The service offering name"`
}
type ServiceInstance struct {
ServiceInstance TrimmedString `positional-arg-name:"SERVICE_INSTANCE" required:"true" description:"The service instance name"`
}
type Organization struct {
Organization string `positional-arg-name:"ORG" required:"true" description:"The organization"`
}
type OrganizationQuota struct {
OrganizationQuotaName string `positional-arg-name:"ORG_QUOTA_NAME" required:"true" description:"The organization quota name"`
}
type APIPath struct {
Path string `positional-arg-name:"PATH" required:"true" description:"The API endpoint"`
}
type PluginRepoName struct {
PluginRepoName string `positional-arg-name:"REPO_NAME" required:"true" description:"The plugin repo name"`
}
type PluginName struct {
PluginName string `positional-arg-name:"PLUGIN_NAME" required:"true" description:"The plugin name"`
}
type Quota struct {
Quota string `positional-arg-name:"QUOTA" required:"true" description:"The organization quota"`
}
type SecurityGroup struct {
SecurityGroup string `positional-arg-name:"SECURITY_GROUP" required:"true" description:"The security group"`
}
type Space struct {
Space string `positional-arg-name:"SPACE" required:"true" description:"The space"`
}
type Rename struct {
OldAppName string `positional-arg-name:"APP_NAME" required:"true" description:"The current app name"`
NewAppName string `positional-arg-name:"NEW_APP_NAME" required:"true" description:"The new app name"`
}
type RenameSpace struct {
OldSpaceName string `positional-arg-name:"SPACE" required:"true" description:"The old space name"`
NewSpaceName string `positional-arg-name:"NEW_SPACE_NAME" required:"true" description:"The new space name"`
}
type SpaceQuota struct {
SpaceQuota string `positional-arg-name:"SPACE_QUOTA_NAME" required:"true" description:"The space quota"`
}
type StackName struct {
StackName string `positional-arg-name:"STACK_NAME" required:"true" description:"The stack name"`
}
type Username struct {
Username string `positional-arg-name:"USERNAME" required:"true" description:"The username"`
}
type APITarget struct {
URL string `positional-arg-name:"URL" description:"API URL to target"`
}
type Authentication struct {
Username string `positional-arg-name:"USERNAME" description:"The username"`
Password string `positional-arg-name:"PASSWORD" description:"The password"`
}
type CreateUser struct {
Username string `positional-arg-name:"USERNAME" required:"true" description:"The username"`
Password *string `positional-arg-name:"PASSWORD" description:"The password"`
}
type AppInstance struct {
AppName string `positional-arg-name:"APP_NAME" required:"true" description:"The application name"`
Index int `positional-arg-name:"INDEX" required:"true" description:"The index of the application instance"`
}
type OrgSpace struct {
Organization string `positional-arg-name:"ORG" required:"true" description:"The organization"`
Space string `positional-arg-name:"SPACE" required:"true" description:"The space"`
}
type ServiceInstanceKey struct {
ServiceInstance string `positional-arg-name:"SERVICE_INSTANCE" required:"true" description:"The service instance"`
ServiceKey string `positional-arg-name:"SERVICE_KEY" required:"true" description:"The service key"`
}
type AppDomain struct {
App string `positional-arg-name:"APP_NAME" required:"true" description:"The application name"`
Domain string `positional-arg-name:"DOMAIN" required:"true" description:"The domain"`
}
type HostDomain struct {
Host string `positional-arg-name:"HOST" required:"true" description:"The hostname"`
Domain string `positional-arg-name:"DOMAIN" required:"true" description:"The domain"`
}
type OrgDomain struct {
Organization string `positional-arg-name:"ORG" required:"true" description:"The organization"`
Domain string `positional-arg-name:"DOMAIN" required:"true" description:"The domain"`
}
type SpaceDomain struct {
Space string `positional-arg-name:"SPACE" required:"true" description:"The space"`
Domain string `positional-arg-name:"DOMAIN" required:"true" description:"The domain"`
}
type BindSecurityGroupArgs struct {
SecurityGroupName string `positional-arg-name:"SECURITY_GROUP" required:"true" description:"The security group name"`
OrganizationName string `positional-arg-name:"ORG" required:"true" description:"The organization group name"`
SpaceName string `positional-arg-name:"SPACE" description:"The space name"`
}
type BindSecurityGroupV7Args struct {
SecurityGroupName string `positional-arg-name:"SECURITY_GROUP" required:"true" description:"The security group name"`
OrganizationName string `positional-arg-name:"ORG" required:"true" description:"The organization group name"`
}
type UnbindSecurityGroupArgs struct {
SecurityGroupName string `positional-arg-name:"SECURITY_GROUP" required:"true" description:"The security group name"`
OrganizationName string `positional-arg-name:"ORG" description:"The organization group name"`
SpaceName string `positional-arg-name:"SPACE" description:"The space name"`
}
type UnbindSecurityGroupV7Args struct {
SecurityGroupName string `positional-arg-name:"SECURITY_GROUP" required:"true" description:"The security group name"`
OrganizationName string `positional-arg-name:"ORG" required:"true" description:"The organization group name"`
SpaceName string `positional-arg-name:"SPACE" required:"true" description:"The space name"`
}
type FilesArgs struct {
AppName string `positional-arg-name:"APP_NAME" required:"true" description:"The application name"`
Path string `positional-arg-name:"PATH" description:"The file path"`
}
type EnvironmentArgs struct {
AppName string `positional-arg-name:"APP_NAME" required:"true" description:"The application name"`
}
type SetEnvironmentArgs struct {
AppName string `positional-arg-name:"APP_NAME" required:"true" description:"The application name"`
EnvironmentVariableName string `positional-arg-name:"ENV_VAR_NAME" required:"true" description:"The environment variable name"`
EnvironmentVariableValue EnvironmentVariable `positional-arg-name:"ENV_VAR_VALUE" required:"true" description:"The environment variable value"`
}
type UnsetEnvironmentArgs struct {
AppName string `positional-arg-name:"APP_NAME" required:"true" description:"The application name"`
EnvironmentVariableName string `positional-arg-name:"ENV_VAR_NAME" required:"true" description:"The environment variable name"`
}
type CopySourceArgs struct {
SourceAppName string `positional-arg-name:"SOURCE-APP" required:"true" description:"The old application name"`
TargetAppName string `positional-arg-name:"TARGET-NAME" required:"true" description:"The new application name"`
}
type CreateServiceArgs struct {
ServiceOffering string `positional-arg-name:"SERVICE_OFFERING" required:"true" description:"The service offering"`
ServicePlan string `positional-arg-name:"SERVICE_PLAN" required:"true" description:"The service plan that the service instance will use"`
ServiceInstance string `positional-arg-name:"SERVICE_INSTANCE" required:"true" description:"The service instance"`
}
type RenameServiceArgs struct {
ServiceInstance string `positional-arg-name:"SERVICE_INSTANCE" required:"true" description:"The service instance to rename"`
NewServiceInstanceName string `positional-arg-name:"NEW_SERVICE_INSTANCE" required:"true" description:"The new name of the service instance"`
}
type ShareServiceArgs struct {
ServiceInstance string `positional-arg-name:"SERVICE_INSTANCE" required:"true" description:"The service instance to rename"`
}
type BindServiceArgs struct {
AppName string `positional-arg-name:"APP_NAME" required:"true" description:"The application name"`
ServiceInstanceName string `positional-arg-name:"SERVICE_INSTANCE" required:"true" description:"The service instance"`
}
type RouteServiceArgs struct {
Domain string `positional-arg-name:"DOMAIN" required:"true" description:"The domain of the route"`
ServiceInstance string `positional-arg-name:"SERVICE_INSTANCE" required:"true" description:"The service instance"`
}
type AppRenameArgs struct {
OldAppName string `positional-arg-name:"APP_NAME" required:"true" description:"The old application name"`
NewAppName string `positional-arg-name:"NEW_APP_NAME" required:"true" description:"The new application name"`
}
type RenameOrgArgs struct {
OldOrgName string `positional-arg-name:"ORG" required:"true" description:"The old organization name"`
NewOrgName string `positional-arg-name:"NEW_ORG_NAME" required:"true" description:"The new organization name"`
}
type RenameSpaceArgs struct {
OldSpaceName string `positional-arg-name:"SPACE_NAME" required:"true" description:"The old space name"`
NewSpaceName string `positional-arg-name:"NEW_SPACE_NAME" required:"true" description:"The new space name"`
}
type SetOrgQuotaArgs struct {
Organization string `positional-arg-name:"ORG" required:"true" description:"The organization"`
OrganizationQuota string `positional-arg-name:"QUOTA" required:"true" description:"The quota"`
}
type SetSpaceQuotaArgs struct {
Space string `positional-arg-name:"SPACE_NAME" required:"true" description:"The space"`
SpaceQuota string `positional-arg-name:"QUOTA" required:"true" description:"The space quota"`
}
type UnsetSpaceQuotaArgs struct {
Space string `positional-arg-name:"SPACE_NAME" required:"true" description:"The space"`
SpaceQuota string `positional-arg-name:"SPACE_QUOTA" required:"true" description:"The space quota"`
}
type SetEnvVarGroup struct {
EnvVarGroupJson string `positional-arg-name:"JSON_STRING" required:"true" description:"json string"`
}
type V6SetHealthCheckArgs struct {
AppName string `positional-arg-name:"APP_NAME" required:"true" description:"The application name"`
HealthCheck HealthCheckTypeWithDeprecatedValue `positional-arg-name:"HEALTH_CHECK_TYPE" required:"true" description:"Set to 'port' or 'none'"`
}
type SetHealthCheckArgs struct {
AppName string `positional-arg-name:"APP_NAME" required:"true" description:"The application name"`
HealthCheck HealthCheckType `positional-arg-name:"HEALTH_CHECK_TYPE" required:"true" description:"Set to 'port'"`
}
type CreateBuildpackArgs struct {
Buildpack string `positional-arg-name:"BUILDPACK" required:"true" description:"The buildpack"`
Path PathWithExistenceCheckOrURL `positional-arg-name:"PATH" required:"true" description:"The path to the buildpack file"`
Position int `positional-arg-name:"POSITION" required:"true" description:"The position that sets priority"`
}
type RenameBuildpackArgs struct {
OldBuildpackName string `positional-arg-name:"BUILDPACK_NAME" required:"true" description:"The old buildpack name"`
NewBuildpackName string `positional-arg-name:"NEW_BUILDPACK_NAME" required:"true" description:"The new buildpack name"`
}
type LabelsArgs struct {
ResourceType string `positional-arg-name:"RESOURCE" required:"true" description:"The type of resource to label"`
ResourceName string `positional-arg-name:"RESOURCE_NAME" required:"true" description:"The name of the resource"`
}
type SetLabelArgs struct {
ResourceType string `positional-arg-name:"RESOURCE" required:"true" description:"The type of resource to label"`
ResourceName string `positional-arg-name:"RESOURCE_NAME" required:"true" description:"The name of the resource"`
Labels []string `positional-arg-name:"KEY=VALUE" required:"true" description:"A space-separated list of labels to set on the resource"`
}
type UnsetLabelArgs struct {
ResourceType string `positional-arg-name:"RESOURCE" required:"true" description:"The type of resource"`
ResourceName string `positional-arg-name:"RESOURCE_NAME" required:"true" description:"The name of the resource"`
LabelKeys []string `positional-arg-name:"KEY" required:"true" description:"A label to unset on the resource"`
}
type OrgRoleArgs struct {
Username string `positional-arg-name:"USERNAME" required:"true" description:"The user"`
Organization string `positional-arg-name:"ORG" required:"true" description:"The organization"`
Role OrgRole `positional-arg-name:"ROLE" required:"true" description:"The organization role"`
}
type SpaceRoleArgs struct {
Username string `positional-arg-name:"USERNAME" required:"true" description:"The user"`
Organization string `positional-arg-name:"ORG" required:"true" description:"The organization"`
Space string `positional-arg-name:"SPACE" required:"true" description:"The space"`
Role SpaceRole `positional-arg-name:"ROLE" required:"true" description:"The space role"`
}
type SpaceUsersArgs struct {
Organization string `positional-arg-name:"ORG" required:"true" description:"The organization"`
Space string `positional-arg-name:"SPACE" required:"true" description:"The space"`
}
type ServiceAuthTokenArgs struct {
Label string `positional-arg-name:"LABEL" required:"true" description:"The token label"`
Provider string `positional-arg-name:"PROVIDER" required:"true" description:"The token provider"`
Token string `positional-arg-name:"TOKEN" required:"true" description:"The token"`
}
type DeleteServiceAuthTokenArgs struct {
Label string `positional-arg-name:"LABEL" required:"true" description:"The token label"`
Provider string `positional-arg-name:"PROVIDER" required:"true" description:"The token provider"`
}
type ServiceBroker struct {
ServiceBroker string `positional-arg-name:"SERVICE_BROKER" required:"true" description:"The service broker"`
}
type ServiceBrokerArgs struct {
ServiceBroker string `positional-arg-name:"SERVICE_BROKER" required:"true" description:"The service broker name"`
Username string `positional-arg-name:"USERNAME" required:"true" description:"The username"`
PasswordOrURL string `positional-arg-name:"URL" required:"true" description:"The URL of the service broker"`
URL string `positional-arg-name:"URL" description:"The URL of the service broker"`
}
type RenameServiceBrokerArgs struct {
OldServiceBrokerName string `positional-arg-name:"SERVICE_BROKER" required:"true" description:"The old service broker name"`
NewServiceBrokerName string `positional-arg-name:"NEW_SERVICE_BROKER" required:"true" description:"The new service broker name"`
}
type MigrateServiceInstancesArgs struct {
V1Service string `positional-arg-name:"v1_SERVICE" required:"true" description:"The old service offering"`
V1Provider string `positional-arg-name:"v1_PROVIDER" required:"true" description:"The old service provider"`
V1Plan string `positional-arg-name:"v1_PLAN" required:"true" description:"The old service plan"`
V2Service string `positional-arg-name:"v2_SERVICE" required:"true" description:"The new service offering"`
V2Plan string `positional-arg-name:"v2_PLAN" required:"true" description:"The new service plan"`
}
type SecurityGroupArgs struct {
SecurityGroup string `positional-arg-name:"SECURITY_GROUP" required:"true" description:"The security group"`
PathToJSONRules PathWithExistenceCheck `positional-arg-name:"PATH_TO_JSON_RULES_FILE" required:"true" description:"Path to file of JSON describing security group rules"`
}
type AddPluginRepoArgs struct {
PluginRepoName string `positional-arg-name:"REPO_NAME" required:"true" description:"The plugin repo name"`
PluginRepoURL string `positional-arg-name:"URL" required:"true" description:"The URL to the plugin repo"`
}
type InstallPluginArgs struct {
PluginNameOrLocation Path `positional-arg-name:"PLUGIN_NAME_OR_LOCATION" required:"true" description:"The local path to the plugin, if the plugin exists locally; the URL to the plugin, if the plugin exists online; or the plugin name, if a repo is specified"`
}
type RunTaskArgs struct {
AppName string `positional-arg-name:"APP_NAME" required:"true" description:"The application name"`
Command string `positional-arg-name:"COMMAND" required:"true" description:"The command to execute"`
}
type RunTaskArgsV7 struct {
AppName string `positional-arg-name:"APP_NAME" required:"true" description:"The application name"`
}
type TerminateTaskArgs struct {
AppName string `positional-arg-name:"APP_NAME" required:"true" description:"The application name"`
SequenceID string `positional-arg-name:"TASK_ID" required:"true" description:"The task's unique sequence ID"`
}
type IsolationSegmentName struct {
IsolationSegmentName string `positional-arg-name:"SEGMENT_NAME" required:"true" description:"The isolation segment name"`
}
type OrgIsolationArgs struct {
OrganizationName string `positional-arg-name:"ORG_NAME" required:"true" description:"The organization name"`
IsolationSegmentName string `positional-arg-name:"SEGMENT_NAME" required:"true" description:"The isolation segment name"`
}
type SpaceIsolationArgs struct {
SpaceName string `positional-arg-name:"SPACE_NAME" required:"true" description:"The space name"`
IsolationSegmentName string `positional-arg-name:"SEGMENT_NAME" required:"true" description:"The isolation segment name"`
}
type ResetSpaceIsolationArgs struct {
SpaceName string `positional-arg-name:"SPACE_NAME" required:"true" description:"The space name"`
}
type ResetOrgDefaultIsolationArgs struct {
OrgName string `positional-arg-name:"ORG_NAME" required:"true" description:"The organization name"`
}
type AddNetworkPolicyArgs struct {
SourceApp string `positional-arg-name:"SOURCE_APP" required:"true" description:"The source app"`
}
type AddNetworkPolicyArgsV7 struct {
SourceApp string `positional-arg-name:"SOURCE_APP" required:"true" description:"The source app"`
DestApp string `positional-arg-name:"DESTINATION_APP" required:"true" description:"The destination app"`
}
type RemoveNetworkPolicyArgs struct {
SourceApp string
}
type RemoveNetworkPolicyArgsV7 struct {
SourceApp string `positional-arg-name:"SOURCE_APP" required:"true" description:"The source app"`
DestApp string `positional-arg-name:"DESTINATION_APP" required:"true" description:"The destination app"`
}