mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
Add any_prefix_match and any_suffix_match functions for bulk prefix and suffix matching. (#4997)
Signed-off-by: Jakub Martin <kubam@spacelift.io>
This commit is contained in:
@@ -3320,6 +3320,108 @@
|
||||
"type": "function"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "strings.any_prefix_match",
|
||||
"decl": {
|
||||
"args": [
|
||||
{
|
||||
"of": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"dynamic": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
{
|
||||
"of": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "set"
|
||||
}
|
||||
],
|
||||
"type": "any"
|
||||
},
|
||||
{
|
||||
"of": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"dynamic": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
{
|
||||
"of": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "set"
|
||||
}
|
||||
],
|
||||
"type": "any"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"type": "function"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "strings.any_suffix_match",
|
||||
"decl": {
|
||||
"args": [
|
||||
{
|
||||
"of": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"dynamic": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
{
|
||||
"of": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "set"
|
||||
}
|
||||
],
|
||||
"type": "any"
|
||||
},
|
||||
{
|
||||
"of": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"dynamic": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
{
|
||||
"of": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "set"
|
||||
}
|
||||
],
|
||||
"type": "any"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"type": "function"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "strings.replace_n",
|
||||
"decl": {
|
||||
|
||||
Reference in New Issue
Block a user