Skip to content

Commit efc5b74

Browse files
authored
DEV: move RESP information from data to each page (#1663)
1 parent 251f45f commit efc5b74

File tree

374 files changed

+5702
-3047
lines changed

Some content is hidden

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

374 files changed

+5702
-3047
lines changed

content/commands/acl-cat.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,21 @@ Then we may want to know what commands are part of a given category:
118118
30) "psync"
119119
31) "sort"
120120
```
121+
122+
## Return information
123+
124+
{{< multitabs id="acl-cat-return-info"
125+
tab1="RESP2"
126+
tab2="RESP3" >}}
127+
128+
One of the following:
129+
* [Array reply](../../develop/reference/protocol-spec#arrays): an array of [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) elements representing ACL categories or commands in a given category.
130+
* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): the command returns an error if an invalid category name is given.
131+
132+
-tab-sep-
133+
134+
One of the following:
135+
* [Array reply](../../develop/reference/protocol-spec#arrays): an array of [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) elements representing ACL categories or commands in a given category.
136+
* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): the command returns an error if an invalid category name is given.
137+
138+
{{< /multitabs >}}

content/commands/acl-deluser.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,17 @@ exist, in such case no operation is performed for the non existing users.
5050
> ACL DELUSER antirez
5151
1
5252
```
53+
54+
## Return information
55+
56+
{{< multitabs id="acl-deluser-return-info"
57+
tab1="RESP2"
58+
tab2="RESP3" >}}
59+
60+
[Integer reply](../../develop/reference/protocol-spec#integers): the number of users that were deleted. This number will not always match the number of arguments since certain users may not exist.
61+
62+
-tab-sep-
63+
64+
[Integer reply](../../develop/reference/protocol-spec#integers): the number of users that were deleted. This number will not always match the number of arguments since certain users may not exist.
65+
66+
{{< /multitabs >}}

content/commands/acl-dryrun.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,21 @@ This command can be used to test the permissions of a given user without having
5656
> ACL DRYRUN VIRGINIA GET foo
5757
"User VIRGINIA has no permissions to run the 'get' command"
5858
```
59+
60+
## Return information
61+
62+
{{< multitabs id="acl-dryrun-return-info"
63+
tab1="RESP2"
64+
tab2="RESP3" >}}
65+
66+
Any of the following:
67+
* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` on success.
68+
* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): an error describing why the user can't execute the command.
69+
70+
-tab-sep-
71+
72+
Any of the following:
73+
* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` on success.
74+
* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): an error describing why the user can't execute the command.
75+
76+
{{< /multitabs >}}

content/commands/acl-genpass.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,17 @@ hex character.
7373
> ACL GENPASS 5
7474
"90"
7575
```
76+
77+
## Return information
78+
79+
{{< multitabs id="acl-genpass-return-info"
80+
tab1="RESP2"
81+
tab2="RESP3" >}}
82+
83+
[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): pseudorandom data. By default it contains 64 bytes, representing 256 bits of data. If `bits` was given, the output string length is the number of specified bits (rounded to the next multiple of 4) divided by 4.
84+
85+
-tab-sep-
86+
87+
[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): pseudorandom data. By default it contains 64 bytes, representing 256 bits of data. If `bits` was given, the output string length is the number of specified bits (rounded to the next multiple of 4) divided by 4.
88+
89+
{{< /multitabs >}}

content/commands/acl-getuser.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,21 @@ Here's an example configuration for a user
8080
9) "channels"
8181
10) "&*"
8282
```
83+
84+
## Return information
85+
86+
{{< multitabs id="acl-getuser-return-info"
87+
tab1="RESP2"
88+
tab2="RESP3" >}}
89+
90+
One of the following:
91+
* [Array reply](../../develop/reference/protocol-spec#arrays): a list of ACL rule definitions for the user.
92+
* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if user does not exist.
93+
94+
-tab-sep-
95+
96+
One of the following:
97+
* [Map reply](../../develop/reference/protocol-spec#maps): a set of ACL rule definitions for the user
98+
* [Null reply](../../develop/reference/protocol-spec#nulls): if user does not exist.
99+
100+
{{< /multitabs >}}

content/commands/acl-help.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,16 @@ title: ACL HELP
2828
---
2929
The `ACL HELP` command returns a helpful text describing the different subcommands.
3030

31+
## Return information
32+
33+
{{< multitabs id="acl-help-return-info"
34+
tab1="RESP2"
35+
tab2="RESP3" >}}
36+
37+
[Array reply](../../develop/reference/protocol-spec#arrays): a list of subcommands and their descriptions.
38+
39+
-tab-sep-
40+
41+
[Array reply](../../develop/reference/protocol-spec#arrays): a list of subcommands and their descriptions.
42+
43+
{{< /multitabs >}}

content/commands/acl-list.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,17 @@ configuration file if you wish (but make sure to check [`ACL SAVE`]({{< relref "
4343
1) "user antirez on #9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 ~objects:* &* +@all -@admin -@dangerous"
4444
2) "user default on nopass ~* &* +@all"
4545
```
46+
47+
## Return information
48+
49+
{{< multitabs id="acl-list-return-info"
50+
tab1="RESP2"
51+
tab2="RESP3" >}}
52+
53+
[Array reply](../../develop/reference/protocol-spec#arrays): an array of [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) elements.
54+
55+
-tab-sep-
56+
57+
[Array reply](../../develop/reference/protocol-spec#arrays): an array of [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) elements.
58+
59+
{{< /multitabs >}}

content/commands/acl-load.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,21 @@ sure to have an *all or nothing* behavior, that is:
4747
> ACL LOAD
4848
-ERR /tmp/foo:1: Unknown command or category name in ACL...
4949
```
50+
51+
## Return information
52+
53+
{{< multitabs id="acl-load-return-info"
54+
tab1="RESP2"
55+
tab2="RESP3" >}}
56+
57+
[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` on success.
58+
The command may fail with an error for several reasons: if the file is not readable, if there is an error inside the file, and in such cases, the error will be reported to the user in the error.
59+
Finally, the command will fail if the server is not configured to use an external ACL file.
60+
61+
-tab-sep-
62+
63+
[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` on success.
64+
The command may fail with an error for several reasons: if the file is not readable, if there is an error inside the file, and in such cases, the error will be reported to the user in the error.
65+
Finally, the command will fail if the server is not configured to use an external ACL file.
66+
67+
{{< /multitabs >}}

content/commands/acl-log.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,24 @@ Each log entry is composed of the following fields:
9494
7. `client-info`: Displays the client info of a client which caused one of the security events.
9595
8. `entry-id`: The sequence number of the entry (starting at 0) since the server process started. Can also be used to check if items were “lost”, if they fell between periods.
9696
9. `timestamp-created`: A UNIX timestamp in `milliseconds` at the time the entry was first created.
97-
10. `timestamp-last-updated`: A UNIX timestamp in `milliseconds` at the time the entry was last updated.
97+
10. `timestamp-last-updated`: A UNIX timestamp in `milliseconds` at the time the entry was last updated.
98+
99+
## Return information
100+
101+
{{< multitabs id="acl-log-return-info"
102+
tab1="RESP2"
103+
tab2="RESP3" >}}
104+
105+
When called to show security events:
106+
* [Array reply](../../develop/reference/protocol-spec#arrays): an array of [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) elements representing ACL security events.
107+
When called with `RESET`:
108+
* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the security log was cleared.
109+
110+
-tab-sep-
111+
112+
When called to show security events:
113+
* [Array reply](../../develop/reference/protocol-spec#arrays): an array of [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) elements representing ACL security events.
114+
When called with `RESET`:
115+
* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` if the security log was cleared.
116+
117+
{{< /multitabs >}}

content/commands/acl-save.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,19 @@ option), this command will save the currently defined ACLs from the server memor
4545
> ACL SAVE
4646
-ERR There was an error trying to save the ACLs. Please check the server logs for more information
4747
```
48+
49+
## Return information
50+
51+
{{< multitabs id="acl-save-return-info"
52+
tab1="RESP2"
53+
tab2="RESP3" >}}
54+
55+
[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`.
56+
The command may fail with an error for several reasons: if the file cannot be written or if the server is not configured to use an external ACL file.
57+
58+
-tab-sep-
59+
60+
[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`.
61+
The command may fail with an error for several reasons: if the file cannot be written or if the server is not configured to use an external ACL file.
62+
63+
{{< /multitabs >}}

content/commands/acl-setuser.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,19 @@ This is a list of all the supported Redis ACL rules:
144144
> ACL SETUSER antirez heeyyyy
145145
(error) ERR Error in ACL SETUSER modifier 'heeyyyy': Syntax error
146146
```
147+
148+
## Return information
149+
150+
{{< multitabs id="acl-setuser-return-info"
151+
tab1="RESP2"
152+
tab2="RESP3" >}}
153+
154+
[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`.
155+
If the rules contain errors, the error is returned.
156+
157+
-tab-sep-
158+
159+
[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`.
160+
If the rules contain errors, the error is returned.
161+
162+
{{< /multitabs >}}

content/commands/acl-users.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,17 @@ users in the Redis ACL system.
4141
2) "antirez"
4242
3) "default"
4343
```
44+
45+
## Return information
46+
47+
{{< multitabs id="acl-users-return-info"
48+
tab1="RESP2"
49+
tab2="RESP3" >}}
50+
51+
[Array reply](../../develop/reference/protocol-spec#arrays): list of existing ACL users.
52+
53+
-tab-sep-
54+
55+
[Array reply](../../develop/reference/protocol-spec#arrays): list of existing ACL users.
56+
57+
{{< /multitabs >}}

content/commands/acl-whoami.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,17 @@ can change user using [`AUTH`]({{< relref "/commands/auth" >}}).
3737
> ACL WHOAMI
3838
"default"
3939
```
40+
41+
## Return information
42+
43+
{{< multitabs id="acl-whoami-return-info"
44+
tab1="RESP2"
45+
tab2="RESP3" >}}
46+
47+
[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the username of the current connection.
48+
49+
-tab-sep-
50+
51+
[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): the username of the current connection.
52+
53+
{{< /multitabs >}}

content/commands/append.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,16 @@ GETRANGE ts 0 3
107107
GETRANGE ts 4 7
108108
{{% /redis-cli %}}
109109

110+
## Return information
111+
112+
{{< multitabs id="append-return-info"
113+
tab1="RESP2"
114+
tab2="RESP3" >}}
115+
116+
[Integer reply](../../develop/reference/protocol-spec#integers): the length of the string after the append operation.
117+
118+
-tab-sep-
119+
120+
[Integer reply](../../develop/reference/protocol-spec#integers): the length of the string after the append operation.
121+
122+
{{< /multitabs >}}

content/commands/asking.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,17 @@ This is normally done automatically by cluster clients.
3232
If an `-ASK` redirect is received during a transaction, only one ASKING command needs to be sent to the target node before sending the complete transaction to the target node.
3333

3434
See [ASK redirection in the Redis Cluster Specification]({{< relref "/operate/oss_and_stack/reference/cluster-spec#ask-redirection" >}}) for details.
35+
36+
## Return information
37+
38+
{{< multitabs id="asking-return-info"
39+
tab1="RESP2"
40+
tab2="RESP3" >}}
41+
42+
[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`.
43+
44+
-tab-sep-
45+
46+
[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`.
47+
48+
{{< /multitabs >}}

content/commands/auth.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,17 @@ Because of the high performance nature of Redis, it is possible to try
7979
a lot of passwords in parallel in very short time, so make sure to generate a
8080
strong and very long password so that this attack is infeasible.
8181
A good way to generate strong passwords is via the [`ACL GENPASS`]({{< relref "/commands/acl-genpass" >}}) command.
82+
83+
## Return information
84+
85+
{{< multitabs id="auth-return-info"
86+
tab1="RESP2"
87+
tab2="RESP3" >}}
88+
89+
[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`, or an error if the password, or username/password pair, is invalid.
90+
91+
-tab-sep-
92+
93+
[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`, or an error if the password, or username/password pair, is invalid.
94+
95+
{{< /multitabs >}}

content/commands/bgrewriteaof.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,19 @@ Since Redis 2.4 the AOF rewrite is automatically triggered by Redis, however the
4949
`BGREWRITEAOF` command can be used to trigger a rewrite at any time.
5050

5151
See the [persistence documentation]({{< relref "/operate/oss_and_stack/management/persistence" >}}) for detailed information.
52+
53+
## Return information
54+
55+
{{< multitabs id="bgrewriteaof-return-info"
56+
tab1="RESP2"
57+
tab2="RESP3" >}}
58+
59+
[Simple string reply](../../develop/reference/protocol-spec#simple-strings): a simple string reply indicating that the rewriting started or is about to start ASAP when the call is executed with success.
60+
The command may reply with an error in certain cases, as documented above.
61+
62+
-tab-sep-
63+
64+
[Bulk string reply](../../develop/reference/protocol-spec#bulk-strings): a simple string reply indicating that the rewriting started or is about to start ASAP when the call is executed with success.
65+
The command may reply with an error in certain cases, as documented above.
66+
67+
{{< /multitabs >}}

content/commands/bgsave.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,21 @@ A client may be able to check if the operation succeeded using the [`LASTSAVE`](
5757
command.
5858

5959
See the [persistence documentation]({{< relref "/operate/oss_and_stack/management/persistence" >}}) for detailed information.
60+
61+
## Return information
62+
63+
{{< multitabs id="bgsave-return-info"
64+
tab1="RESP2"
65+
tab2="RESP3" >}}
66+
67+
One of the following:
68+
* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `Background saving started`.
69+
* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `Background saving scheduled`.
70+
71+
-tab-sep-
72+
73+
One of the following:
74+
* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `Background saving started`.
75+
* [Simple string reply](../../develop/reference/protocol-spec#simple-strings): `Background saving scheduled`.
76+
77+
{{< /multitabs >}}

content/commands/bitcount.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,17 @@ When the bitmap is big, there are two alternatives:
141141
* Running the bitmap incrementally using the `BITCOUNT` _start_ and _end_
142142
optional parameters, accumulating the results client-side, and optionally
143143
caching the result into a key.
144+
145+
## Return information
146+
147+
{{< multitabs id="bitcount-return-info"
148+
tab1="RESP2"
149+
tab2="RESP3" >}}
150+
151+
[Integer reply](../../develop/reference/protocol-spec#integers): the number of bits set to 1.
152+
153+
-tab-sep-
154+
155+
[Integer reply](../../develop/reference/protocol-spec#integers): the number of bits set to 1.
156+
157+
{{< /multitabs >}}

content/commands/bitfield.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,3 +229,21 @@ bitmap previously set to all zeroes, will produce the following representation:
229229
When offsets and integer sizes are aligned to bytes boundaries, this is the
230230
same as big endian, however when such alignment does not exist, its important
231231
to also understand how the bits inside a byte are ordered.
232+
233+
## Return information
234+
235+
{{< multitabs id="bitfield-return-info"
236+
tab1="RESP2"
237+
tab2="RESP3" >}}
238+
239+
One of the following:
240+
* [Array reply](../../develop/reference/protocol-spec#arrays): each entry being the corresponding result of the sub-command given at the same position.
241+
* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): if OVERFLOW FAIL was given and overflows or underflows are detected.
242+
243+
-tab-sep-
244+
245+
One of the following:
246+
* [Array reply](../../develop/reference/protocol-spec#arrays): each entry being the corresponding result of the sub-command given at the same position.
247+
* [Null reply](../../develop/reference/protocol-spec#nulls): if OVERFLOW FAIL was given and overflows or underflows are detected.
248+
249+
{{< /multitabs >}}

0 commit comments

Comments
 (0)