Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Module ¶
Module returns a function conforming to `func(*rego.Rego)`. Internally, it tries to parse & transform the Rego code via ParseModule. If parsing fails, it falls back to providing the **original code** to OPA, so that OPA will raise a compile error at evaluation time.
TODO: If you prefer to detect errors earlier, call ParseModule(...) directly and handle them before using Module(...). This design just defers the error to OPA's compile phase instead of returning it immediately.
func ParseModule ¶
ParseModule parses and transforms the given Rego source.
- If parsing fails, returns an error.
- If an import marker like "data.regobrick.default_false" exists, applies the corresponding AST transformation (e.g. addDefaultFalse).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.