Skip to content

Commit a8a8300

Browse files
authored
Merge branch 'main' into issue_6330
2 parents 8a698c9 + a3be450 commit a8a8300

File tree

5 files changed

+26
-6
lines changed

5 files changed

+26
-6
lines changed

Diff for: docs/content/contrib-adding-builtin-functions.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ import (
6969
"fmt"
7070
"strings"
7171

72-
"github.com/open-policy-agent/opa/ast"
73-
"github.com/open-policy-agent/opa/topdown/builtins"
72+
"github.com/open-policy-agent/opa/v1/ast"
73+
"github.com/open-policy-agent/opa/v1/topdown/builtins"
7474
)
7575

7676
// implements topdown.BuiltinFunc
@@ -105,7 +105,7 @@ The call to `RegisterBuiltinFunc(...)` in `init()` adds the built-in function to
105105
### Test
106106

107107
All built-in function implementations must include a test suite.
108-
Test cases for built-in functions are written in YAML and located under `test/cases/testdata`.
108+
Test cases for built-in functions are written in YAML and located under `test/cases/testdata/v1`.
109109

110110
We create two new test cases (one positive, expecting a string output; and one negative, expecting an error) for our built-in function:
111111

@@ -117,7 +117,7 @@ cases:
117117
- |
118118
package test
119119
120-
p := repeated {
120+
p := repeated if {
121121
repeated := repeat(input.str, input.count)
122122
}
123123
input: {"str": "Foo", "count": 3}
@@ -129,7 +129,7 @@ cases:
129129
- |
130130
package test
131131
132-
p := repeated {
132+
p := repeated if {
133133
repeated := repeat(input.str, input.count)
134134
}
135135
input: { "str": "Foo", "count": -3 }
@@ -138,7 +138,7 @@ cases:
138138
want_error: 'repeat: count must be a positive integer'
139139
```
140140
141-
The above test cases can be run separate from all other tests through: `go test ./topdown -v -run 'TestRego/repeat'`
141+
The above test cases can be run separate from all other tests through: `go test ./topdown -v -run 'TestRego/v1/repeat'`
142142

143143
See [test/cases/testdata/helloworld](https://github.com/open-policy-agent/opa/blob/main/test/cases/testdata/helloworld)
144144
for a more detailed example of how to implement tests for your built-in functions.

Diff for: docs/website/content/integrations/tavoai.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: TavoAI
3+
software:
4+
- tavo
5+
inventors:
6+
- tavoai
7+
code:
8+
- https://github.com/TavoAI/tavo-python-sdk
9+
- https://github.com/TavoAI/tavo-cli
10+
---
11+
Tavo leverages OPA for proactive AI risk management by enforcing risk controls. Risk controls are translated to Rego code and allow developers to implement the controls seamlessly by integrating with Tavo SDK.
12+
Tavo uses OPA as the decision engine for control enforcement.

Diff for: docs/website/content/organizations/tavoai.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
link: https://www.gettavo.com/
3+
title: TavoAI
4+
---

Diff for: docs/website/content/softwares/tavo.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
link: https://github.com/TavoAI/tavo-cli
3+
title: tavo
4+
---
15.3 KB
Loading

0 commit comments

Comments
 (0)