Skip to content

Commit c4a216d

Browse files
authored
feat(rdb): add short for openapi groups and cli resources (#1191)
1 parent dbd1df2 commit c4a216d

File tree

4 files changed

+46
-24
lines changed

4 files changed

+46
-24
lines changed

cmd/scw/testdata/test-all-usage-rdb-certificate-usage.golden

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
TLS certificate used by your instance.
4+
35
USAGE:
46
scw rdb certificate <command>
57

cmd/scw/testdata/test-all-usage-rdb-log-usage.golden

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Logs generated by your instance.
4+
35
USAGE:
46
scw rdb log <command>
57

cmd/scw/testdata/test-all-usage-rdb-usage.golden

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,26 @@ USAGE:
66
scw rdb <command>
77

88
AVAILABLE COMMANDS:
9-
acl
10-
backup
11-
certificate
12-
database
13-
engine
14-
instance
15-
log
16-
node-type
17-
privilege
18-
settings
19-
user
9+
acl Network Access Control List allows to control network in and out traffic by setting up ACL rules
10+
11+
backup Backups are extracted data of your database at a given time
12+
13+
certificate TLS certificate used by your instance
14+
database Manage logical databases on your instance
15+
16+
engine Software that stores and retrieves data from a database
17+
18+
instance A Database Instance is composed of one or more Nodes, depending of the is_ha_cluster setting
19+
20+
log Logs generated by your instance
21+
node-type Node types powering your instance
22+
23+
privilege Define some privileges to a user on a specific database
24+
25+
settings Instance Settings are tunables of Database Engines
26+
27+
user Manage users on your instance
28+
2029

2130
FLAGS:
2231
-h, --help help for rdb

internal/namespaces/rdb/v1/rdb_cli.go

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ func rdbRoot() *core.Command {
7777

7878
func rdbBackup() *core.Command {
7979
return &core.Command{
80-
Short: ``,
80+
Short: `Backups are extracted data of your database at a given time
81+
`,
8182
Long: `Save and restore backups of your database instance.
8283
`,
8384
Namespace: "rdb",
@@ -87,7 +88,8 @@ func rdbBackup() *core.Command {
8788

8889
func rdbEngine() *core.Command {
8990
return &core.Command{
90-
Short: ``,
91+
Short: `Software that stores and retrieves data from a database
92+
`,
9193
Long: `Software that stores and retrieves data from a database. Each database engine has a name and versions.
9294
`,
9395
Namespace: "rdb",
@@ -97,7 +99,8 @@ func rdbEngine() *core.Command {
9799

98100
func rdbInstance() *core.Command {
99101
return &core.Command{
100-
Short: ``,
102+
Short: `A Database Instance is composed of one or more Nodes, depending of the is_ha_cluster setting
103+
`,
101104
Long: `A Database Instance is composed of one or more Nodes, depending of the is_ha_cluster setting. Autohealing is enabled by default for HA clusters. Database automated backup is enabled by default in order to prevent data loss.
102105
`,
103106
Namespace: "rdb",
@@ -107,7 +110,8 @@ func rdbInstance() *core.Command {
107110

108111
func rdbACL() *core.Command {
109112
return &core.Command{
110-
Short: ``,
113+
Short: `Network Access Control List allows to control network in and out traffic by setting up ACL rules
114+
`,
111115
Long: `Network Access Control List allows to control network in and out traffic by setting up ACL rules. ACL rules could be created, edited, deleted
112116
`,
113117
Namespace: "rdb",
@@ -117,7 +121,8 @@ func rdbACL() *core.Command {
117121

118122
func rdbSettings() *core.Command {
119123
return &core.Command{
120-
Short: ``,
124+
Short: `Instance Settings are tunables of Database Engines
125+
`,
121126
Long: `Instance Settings are tunables of Database Engines. Available settings depend on the database engine and its version.
122127
`,
123128
Namespace: "rdb",
@@ -127,7 +132,8 @@ func rdbSettings() *core.Command {
127132

128133
func rdbPrivilege() *core.Command {
129134
return &core.Command{
130-
Short: ``,
135+
Short: `Define some privileges to a user on a specific database
136+
`,
131137
Long: `Define some privileges to a user on a specific database.
132138
`,
133139
Namespace: "rdb",
@@ -137,7 +143,8 @@ func rdbPrivilege() *core.Command {
137143

138144
func rdbUser() *core.Command {
139145
return &core.Command{
140-
Short: ``,
146+
Short: `Manage users on your instance
147+
`,
141148
Long: `Manage users on your instance
142149
`,
143150
Namespace: "rdb",
@@ -147,7 +154,8 @@ func rdbUser() *core.Command {
147154

148155
func rdbDatabase() *core.Command {
149156
return &core.Command{
150-
Short: ``,
157+
Short: `Manage logical databases on your instance
158+
`,
151159
Long: `Manage logical databases on your instance
152160
`,
153161
Namespace: "rdb",
@@ -157,7 +165,8 @@ func rdbDatabase() *core.Command {
157165

158166
func rdbNodeType() *core.Command {
159167
return &core.Command{
160-
Short: ``,
168+
Short: `Node types powering your instance
169+
`,
161170
Long: `Node types powering your instance
162171
`,
163172
Namespace: "rdb",
@@ -167,17 +176,17 @@ func rdbNodeType() *core.Command {
167176

168177
func rdbLog() *core.Command {
169178
return &core.Command{
170-
Short: ``,
171-
Long: ``,
179+
Short: `Logs generated by your instance`,
180+
Long: `Logs generated by your instance.`,
172181
Namespace: "rdb",
173182
Resource: "log",
174183
}
175184
}
176185

177186
func rdbCertificate() *core.Command {
178187
return &core.Command{
179-
Short: ``,
180-
Long: ``,
188+
Short: `TLS certificate used by your instance`,
189+
Long: `TLS certificate used by your instance.`,
181190
Namespace: "rdb",
182191
Resource: "certificate",
183192
}

0 commit comments

Comments
 (0)