Native OCaml Rego/OPA policy engine
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Upgrade to ocamlformat 0.29.0; fix csvt/sexpt streaming; reformat

- Update .ocamlformat to 0.29.0 across all 591 files
- csvt: reuse single Buffer.t for field reads (no alloc per field)
- sexpt: Obj members decoded from stream into Dict, typed Variant GADT
- Reformat all source files for 0.29.0

+8 -8
+8 -8
lib/rego.ml
··· 10 10 {2 Quick Start} 11 11 12 12 {[ 13 - let engine = Rego.engine () in 14 - Rego.add_policy engine ~name:"example.rego" 15 - {| 13 + let engine = Rego.engine () in 14 + Rego.add_policy engine ~name:"example.rego" 15 + {| 16 16 package authz 17 17 default allow = false 18 18 allow { input.user == "admin" } 19 19 |}; 20 - let input = 21 - Result.get_ok (Rego.Value.of_json_string {|{"user": "admin"}|}) 22 - in 23 - let result = Rego.eval engine ~input "data.authz.allow" in 24 - assert (result = Rego.Value.Bool true) 20 + let input = 21 + Result.get_ok (Rego.Value.of_json_string {|{"user": "admin"}|}) 22 + in 23 + let result = Rego.eval engine ~input "data.authz.allow" in 24 + assert (result = Rego.Value.Bool true) 25 25 ]} *) 26 26 27 27 module Value = Value