-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ES|QL] Add/Modify annotations for operators for better doc generation (
#108220) * annotation for operators
- Loading branch information
1 parent
47a18d2
commit 4daac77
Showing
44 changed files
with
431 additions
and
273 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
docs/reference/esql/functions/description/cidr_match.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. | ||
|
||
*Description* | ||
|
||
Returns true if the provided IP is contained in one of the provided CIDR blocks. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
docs/reference/esql/functions/examples/cidr_match.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. | ||
|
||
*Example* | ||
|
||
[source.merge.styled,esql] | ||
---- | ||
include::{esql-specs}/ip.csv-spec[tag=cdirMatchMultipleArgs] | ||
---- | ||
[%header.monospaced.styled,format=dsv,separator=|] | ||
|=== | ||
include::{esql-specs}/ip.csv-spec[tag=cdirMatchMultipleArgs-result] | ||
|=== | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. | ||
|
||
*Example* | ||
|
||
[source.merge.styled,esql] | ||
---- | ||
include::{esql-specs}/string.csv-spec[tag=endsWith] | ||
---- | ||
[%header.monospaced.styled,format=dsv,separator=|] | ||
|=== | ||
include::{esql-specs}/string.csv-spec[tag=endsWith-result] | ||
|=== | ||
|
13 changes: 13 additions & 0 deletions
13
docs/reference/esql/functions/examples/starts_with.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. | ||
|
||
*Example* | ||
|
||
[source.merge.styled,esql] | ||
---- | ||
include::{esql-specs}/docs.csv-spec[tag=startsWith] | ||
---- | ||
[%header.monospaced.styled,format=dsv,separator=|] | ||
|=== | ||
include::{esql-specs}/docs.csv-spec[tag=startsWith-result] | ||
|=== | ||
|
47 changes: 47 additions & 0 deletions
47
docs/reference/esql/functions/kibana/definition/cidr_match.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.", | ||
"type" : "eval", | ||
"name" : "cidr_match", | ||
"description" : "Returns true if the provided IP is contained in one of the provided CIDR blocks.", | ||
"signatures" : [ | ||
{ | ||
"params" : [ | ||
{ | ||
"name" : "ip", | ||
"type" : "ip", | ||
"optional" : false, | ||
"description" : "IP address of type `ip` (both IPv4 and IPv6 are supported)." | ||
}, | ||
{ | ||
"name" : "blockX", | ||
"type" : "keyword", | ||
"optional" : false, | ||
"description" : "CIDR block to test the IP against." | ||
} | ||
], | ||
"variadic" : true, | ||
"returnType" : "boolean" | ||
}, | ||
{ | ||
"params" : [ | ||
{ | ||
"name" : "ip", | ||
"type" : "ip", | ||
"optional" : false, | ||
"description" : "IP address of type `ip` (both IPv4 and IPv6 are supported)." | ||
}, | ||
{ | ||
"name" : "blockX", | ||
"type" : "text", | ||
"optional" : false, | ||
"description" : "CIDR block to test the IP against." | ||
} | ||
], | ||
"variadic" : true, | ||
"returnType" : "boolean" | ||
} | ||
], | ||
"examples" : [ | ||
"FROM hosts \n| WHERE CIDR_MATCH(ip1, \"127.0.0.2/32\", \"127.0.0.3/32\") \n| KEEP card, host, ip0, ip1" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!-- | ||
This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. | ||
--> | ||
|
||
### CIDR_MATCH | ||
Returns true if the provided IP is contained in one of the provided CIDR blocks. | ||
|
||
``` | ||
FROM hosts | ||
| WHERE CIDR_MATCH(ip1, "127.0.0.2/32", "127.0.0.3/32") | ||
| KEEP card, host, ip0, ip1 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. | ||
|
||
[discrete] | ||
[[esql-cidr_match]] | ||
=== `CIDR_MATCH` | ||
|
||
*Syntax* | ||
|
||
[.text-center] | ||
image::esql/functions/signature/cidr_match.svg[Embedded,opts=inline] | ||
|
||
include::../parameters/cidr_match.asciidoc[] | ||
include::../description/cidr_match.asciidoc[] | ||
include::../types/cidr_match.asciidoc[] | ||
include::../examples/cidr_match.asciidoc[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it. | ||
|
||
*Parameters* | ||
|
||
`ip`:: | ||
IP address of type `ip` (both IPv4 and IPv6 are supported). | ||
|
||
`blockX`:: | ||
CIDR block to test the IP against. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.