forked from scaleway/scaleway-cli
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcommands.go
More file actions
136 lines (130 loc) · 6.19 KB
/
commands.go
File metadata and controls
136 lines (130 loc) · 6.19 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
package commands
import (
"os"
"github.com/scaleway/scaleway-cli/v2/core"
accountv3 "github.com/scaleway/scaleway-cli/v2/internal/namespaces/account/v3"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/alias"
applesilicon "github.com/scaleway/scaleway-cli/v2/internal/namespaces/applesilicon/v1alpha1"
audit_trail "github.com/scaleway/scaleway-cli/v2/internal/namespaces/audit_trail/v1alpha1"
autocompleteNamespace "github.com/scaleway/scaleway-cli/v2/internal/namespaces/autocomplete"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/baremetal/v1"
billing "github.com/scaleway/scaleway-cli/v2/internal/namespaces/billing/v2beta1"
block "github.com/scaleway/scaleway-cli/v2/internal/namespaces/block/v1alpha1"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/cockpit/v1"
configNamespace "github.com/scaleway/scaleway-cli/v2/internal/namespaces/config"
container "github.com/scaleway/scaleway-cli/v2/internal/namespaces/container/v1beta1"
datalab "github.com/scaleway/scaleway-cli/v2/internal/namespaces/datalab/v1beta1"
datawarehouse "github.com/scaleway/scaleway-cli/v2/internal/namespaces/datawarehouse/v1beta1"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/dedibox/v1"
domain "github.com/scaleway/scaleway-cli/v2/internal/namespaces/domain/v2beta1"
edgeservices "github.com/scaleway/scaleway-cli/v2/internal/namespaces/edge_services/v1beta1"
environmental_footprint "github.com/scaleway/scaleway-cli/v2/internal/namespaces/environmental_footprint/v1alpha1"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/feedback"
file "github.com/scaleway/scaleway-cli/v2/internal/namespaces/file/v1alpha1"
flexibleip "github.com/scaleway/scaleway-cli/v2/internal/namespaces/flexibleip/v1alpha1"
function "github.com/scaleway/scaleway-cli/v2/internal/namespaces/function/v1beta1"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/help"
iam "github.com/scaleway/scaleway-cli/v2/internal/namespaces/iam/v1alpha1"
inference "github.com/scaleway/scaleway-cli/v2/internal/namespaces/inference/v1"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/info"
initNamespace "github.com/scaleway/scaleway-cli/v2/internal/namespaces/init"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1"
interlink "github.com/scaleway/scaleway-cli/v2/internal/namespaces/interlink/v1beta1"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/iot/v1"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/ipam/v1"
jobs "github.com/scaleway/scaleway-cli/v2/internal/namespaces/jobs/v1alpha2"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/k8s/v1"
keymanager "github.com/scaleway/scaleway-cli/v2/internal/namespaces/key_manager/v1alpha1"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/lb/v1"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/login"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/marketplace/v2"
mnq "github.com/scaleway/scaleway-cli/v2/internal/namespaces/mnq/v1beta1"
mongodb "github.com/scaleway/scaleway-cli/v2/internal/namespaces/mongodb/v1alpha1"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/object/v1"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/partner/v1"
product_catalog "github.com/scaleway/scaleway-cli/v2/internal/namespaces/product_catalog/v2alpha1"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/rdb/v1"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/redis/v1"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/registry/v1"
s2s_vpn "github.com/scaleway/scaleway-cli/v2/internal/namespaces/s2s_vpn/v1alpha1"
searchdb "github.com/scaleway/scaleway-cli/v2/internal/namespaces/searchdb/v1alpha1"
secret "github.com/scaleway/scaleway-cli/v2/internal/namespaces/secret/v1beta1"
serverless_sqldb "github.com/scaleway/scaleway-cli/v2/internal/namespaces/serverless_sqldb/v1alpha1"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/shell"
tem "github.com/scaleway/scaleway-cli/v2/internal/namespaces/tem/v1alpha1"
versionNamespace "github.com/scaleway/scaleway-cli/v2/internal/namespaces/version"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/vpc/v2"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/vpcgw/v2"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/webhosting/v1"
"github.com/scaleway/scaleway-sdk-go/scw"
)
// Enable beta in the code when products are in beta
var beta = os.Getenv(scw.ScwEnableBeta) == "true"
// GetCommands returns a list of all commands in the CLI.
// It is used by both scw and scw-qa.
// We can not put it in `core` package as it would result in a import cycle `core` -> `namespaces/autocomplete` -> `core`.
func GetCommands() *core.Commands {
// Import all commands available in CLI from various packages.
// NB: Merge order impacts scw usage sort.
commands := core.NewCommandsMerge(
iam.GetCommands(),
instance.GetCommands(),
baremetal.GetCommands(),
cockpit.GetCommands(),
k8s.GetCommands(),
marketplace.GetCommands(),
initNamespace.GetCommands(),
configNamespace.GetCommands(),
accountv3.GetCommands(),
autocompleteNamespace.GetCommands(),
object.GetCommands(),
versionNamespace.GetCommands(),
registry.GetCommands(),
feedback.GetCommands(),
info.GetCommands(),
rdb.GetCommands(),
lb.GetCommands(),
iot.GetCommands(),
inference.GetCommands(),
help.GetCommands(),
vpc.GetCommands(),
domain.GetCommands(),
applesilicon.GetCommands(),
flexibleip.GetCommands(),
file.GetCommands(),
container.GetCommands(),
function.GetCommands(),
vpcgw.GetCommands(),
redis.GetCommands(),
secret.GetCommands(),
keymanager.GetCommands(),
shell.GetCommands(),
tem.GetCommands(),
alias.GetCommands(),
webhosting.GetCommands(),
billing.GetCommands(),
mnq.GetCommands(),
block.GetCommands(),
ipam.GetCommands(),
jobs.GetCommands(),
serverless_sqldb.GetCommands(),
edgeservices.GetCommands(),
login.GetCommands(),
mongodb.GetCommands(),
audit_trail.GetCommands(),
interlink.GetCommands(),
s2s_vpn.GetCommands(),
searchdb.GetCommands(),
datalab.GetCommands(),
datawarehouse.GetCommands(),
partner.GetCommands(),
environmental_footprint.GetCommands(),
product_catalog.GetCommands(),
)
if beta {
commands.Merge(
dedibox.GetCommands(),
)
}
return commands
}