Skip to content

Commit 9672d59

Browse files
remyleoneLaure-di
andauthored
docs: add section for command namespaces (scaleway#4620)
Co-authored-by: Laure-di <[email protected]>
1 parent 95148b6 commit 9672d59

File tree

41 files changed

+138
-33
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+138
-33
lines changed

cmd/scw/testdata/test-main-usage-usage.golden

Lines changed: 58 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,54 +3,79 @@
33
USAGE:
44
scw <command>
55

6-
AVAILABLE COMMANDS:
7-
account This API allows you to manage your Scaleway Projects
6+
AI COMMANDS:
7+
inference This API allows you to manage your Inference services
8+
9+
BAREMETAL COMMANDS:
810
apple-silicon Apple silicon API
9-
audit-trail This API allows you to ensure accountability and security by recording events and changes performed within your Scaleway Organization.
10-
autocomplete Autocomplete related commands
1111
baremetal Elastic Metal API
12-
billing This API allows you to manage and query your Scaleway billing and consumption
13-
block This API allows you to manage your Block Storage volumes
14-
cockpit This API allows you to manage your Scaleway Cockpit, for storing and visualizing metrics and logs
15-
container This API allows you to manage your Serverless Containers
16-
dns This API allows you to manage your domains, DNS zones and records
17-
document-db This API allows you to manage your Document Databases
18-
edge-services Edge Services API
1912
fip This API allows you to manage your Elastic Metal servers' flexible public IP addresses
20-
function Function as a Service API
21-
help Get help about how the CLI works
22-
iam This API allows you to manage Identity and Access Management (IAM) across your Scaleway Organizations, Projects and resources
23-
inference This API allows you to manage your Inference services
13+
14+
COMPUTE COMMANDS:
2415
instance This API allows you to manage your Instances
25-
interlink This API allows you to manage your InterLink services
26-
iot This API allows you to manage your IoT hubs and devices
27-
ipam This API allows you to manage your Scaleway IP addresses with our IP Address Management tool
28-
jobs This API allows you to manage your Serverless Jobs
29-
k8s This API allows you to manage Kubernetes Kapsule and Kosmos clusters
30-
keymanager Key Manager API
31-
lb This API allows you to manage your Scaleway Load Balancer services
3216
marketplace This API allows you to find available images for use when launching a Scaleway Instance
33-
mnq These APIs allow you to manage your Messaging and Queuing NATS, Queues and Topics and Events services
17+
18+
CONFIGURATION COMMANDS:
19+
alias Alias related commands
20+
config Config file management
21+
info Get info about current settings
22+
init Initialize the config
23+
login Login to scaleway
24+
25+
CONTAINER COMMANDS:
26+
k8s This API allows you to manage Kubernetes Kapsule and Kosmos clusters
27+
registry This API allows you to manage your Container Registry resources
28+
29+
COST COMMANDS:
30+
billing This API allows you to manage and query your Scaleway billing and consumption
31+
32+
DATABASE COMMANDS:
33+
document-db This API allows you to manage your Document Databases
3434
mongodb This API allows you to manage your Managed Databases for MongoDB®
35-
object Object-storage utils
3635
rdb This API allows you to manage your Managed Databases for PostgreSQL and MySQL
3736
redis This API allows you to manage your Managed Databases for Redis™
38-
registry This API allows you to manage your Container Registry resources
3937
sdb-sql This API allows you to manage your Serverless SQL Databases
40-
secret Secret Manager API
38+
39+
DOMAIN & WEBHOSTING COMMANDS:
40+
dns This API allows you to manage your domains, DNS zones and records
4141
tem This API allows you to manage your Transactional Email services
42+
webhosting This API allows you to manage your Web Hosting services
43+
44+
INTEGRATION COMMANDS:
45+
iot This API allows you to manage your IoT hubs and devices
46+
mnq These APIs allow you to manage your Messaging and Queuing NATS, Queues and Topics and Events services
47+
48+
MONITORING COMMANDS:
49+
audit-trail This API allows you to ensure accountability and security by recording events and changes performed within your Scaleway Organization.
50+
cockpit This API allows you to manage your Scaleway Cockpit, for storing and visualizing metrics and logs
51+
52+
NETWORK COMMANDS:
53+
edge-services Edge Services API
54+
interlink This API allows you to manage your InterLink services
55+
ipam This API allows you to manage your Scaleway IP addresses with our IP Address Management tool
56+
lb This API allows you to manage your Scaleway Load Balancer services
4257
vpc This API allows you to manage your Virtual Private Clouds (VPCs) and Private Networks
4358
vpc-gw This API allows you to manage your Public Gateways
44-
webhosting This API allows you to manage your Web Hosting services
4559

46-
CONFIGURATION COMMANDS:
47-
alias Alias related commands
48-
config Config file management
49-
info Get info about current settings
50-
init Initialize the config
51-
login Login to scaleway
60+
SECURITY COMMANDS:
61+
account This API allows you to manage your Scaleway Projects
62+
audit-trail This API allows you to ensure accountability and security by recording events and changes performed within your Scaleway Organization.
63+
iam This API allows you to manage Identity and Access Management (IAM) across your Scaleway Organizations, Projects and resources
64+
keymanager Key Manager API
65+
secret Secret Manager API
66+
67+
SERVERLESS COMMANDS:
68+
container This API allows you to manage your Serverless Containers
69+
function Function as a Service API
70+
jobs This API allows you to manage your Serverless Jobs
71+
72+
STORAGE COMMANDS:
73+
block This API allows you to manage your Block Storage volumes
74+
object Object-storage utils
75+
registry This API allows you to manage your Container Registry resources
5276

5377
UTILITY COMMANDS:
78+
autocomplete Autocomplete related commands
5479
feedback Send feedback to the Scaleway CLI Team!
5580
help Get help about how the CLI works
5681
shell Start shell mode

internal/namespaces/account/v3/custom.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@ import (
77
func GetCommands() *core.Commands {
88
commands := GetGeneratedCommands()
99

10+
commands.MustFind("account").Groups = []string{"security"}
11+
1012
return commands
1113
}

internal/namespaces/applesilicon/v1alpha1/custom.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ func GetCommands() *core.Commands {
1414
serverWaitCommand(),
1515
))
1616

17+
cmds.MustFind("apple-silicon").Groups = []string{"baremetal"}
18+
1719
human.RegisterMarshalerFunc(applesilicon.ServerTypeCPU{}, cpuMarshalerFunc)
1820
human.RegisterMarshalerFunc(applesilicon.ServerTypeDisk{}, diskMarshalerFunc)
1921
human.RegisterMarshalerFunc(applesilicon.ServerTypeMemory{}, memoryMarshalerFunc)

internal/namespaces/audit_trail/v1alpha1/custom.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import (
77
func GetCommands() *core.Commands {
88
cmds := GetGeneratedCommands()
99

10+
cmds.MustFind("audit-trail").Groups = []string{"security", "monitoring"}
11+
1012
cmds.MustFind("audit-trail", "event", "list").Override(eventListBuilder)
1113

1214
return cmds

internal/namespaces/autocomplete/autocomplete.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ func autocompleteRootCommand() *core.Command {
4141
Short: `Autocomplete related commands`,
4242
Long: ``,
4343
Namespace: "autocomplete",
44+
Groups: []string{"utility"},
4445
}
4546
}
4647

internal/namespaces/baremetal/v1/custom.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import (
99
func GetCommands() *core.Commands {
1010
cmds := GetGeneratedCommands()
1111

12+
cmds.MustFind("baremetal").Groups = []string{"baremetal"}
13+
1214
cmds.Merge(core.NewCommands(
1315
serverWaitCommand(),
1416
serverAddFlexibleIP(),

internal/namespaces/billing/v2beta1/custom.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ var invoiceTypeMarshalSpecs = human.EnumMarshalSpecs{
1414
func GetCommands() *core.Commands {
1515
cmds := GetGeneratedCommands()
1616

17+
cmds.MustFind("billing").Groups = []string{"cost"}
18+
1719
human.RegisterMarshalerFunc(billing.DownloadInvoiceRequestFileType("pdf"), human.EnumMarshalFunc(invoiceTypeMarshalSpecs))
1820
cmds.MustFind("billing", "invoice", "download").Override(invoiceDownloadBuilder)
1921
cmds.MustFind("billing", "invoice", "export").Override(invoiceExportBuilder)

internal/namespaces/block/v1alpha1/custom.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ var (
4545
func GetCommands() *core.Commands {
4646
cmds := GetGeneratedCommands()
4747

48+
cmds.MustFind("block").Groups = []string{"storage"}
49+
4850
cmds.Add(volumeWaitCommand())
4951
cmds.Add(snapshotWaitCommand())
5052

internal/namespaces/cockpit/v1/custom.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import (
77
func GetCommands() *core.Commands {
88
cmds := GetGeneratedCommands()
99

10+
cmds.MustFind("cockpit").Groups = []string{"monitoring"}
11+
1012
cmds.MustFind("cockpit", "token", "get").Override(cockpitTokenGetBuilder)
1113

1214
return cmds

internal/namespaces/container/v1beta1/custom.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import (
99
func GetCommands() *core.Commands {
1010
cmds := GetGeneratedCommands()
1111

12+
cmds.MustFind("container").Groups = []string{"serverless"}
13+
1214
human.RegisterMarshalerFunc(container.NamespaceStatus(""), human.EnumMarshalFunc(namespaceStatusMarshalSpecs))
1315
human.RegisterMarshalerFunc(container.ContainerStatus(""), human.EnumMarshalFunc(containerStatusMarshalSpecs))
1416
human.RegisterMarshalerFunc(container.CronStatus(""), human.EnumMarshalFunc(cronStatusMarshalSpecs))

0 commit comments

Comments
 (0)