Commit 2bf8b3f
committed
refactor to reduce public api surface and more tightly scope names
This is a large-ish refactor to reduce the public API surface. Types
that are only needed within package scope were changed to reflect that.
Public names that might cause conflicts in the importing side have been
grouped into a new `OPA` namespace enum.
This change also begins documentation efforts using DocC.
Other changes are included to make the API more idiomatic.
* with/and
* store: read(from:) and write(to:)
* withCtx -> withContext
* init(fromJson:) -> init(jsonData:)
* defaultBuiltinRegistry -> static property
* BuiltinContext -> internal
* RegoValue type helpers -> package scope
* BuiltinsCache -> internal
* EvaluationContext -> internal
* unify error types under RegoError
* qualify Swift.Error
* Error -> Swift.Error
* StoreError -> RegoError
* rework BuiltinError in terms of RegoError, leaving adapters
* package visibility for ValueError
* remove EncodingError and incomplete encode methods
* prettyPrint(out:) -> prettyPrint(to:)
* prepareForEval->prepareForEvaluation
* RegoValue patch/merge, RegoEncodingError -> package visibility
* integrate functiondecl code from capabilities branch
* rename swift-rego -> swift-opa
* remove benchmarks - will return when further built out
* rename Bundle -> OPABundle to avoid name collisions
* remove unused Runtime module
* public -> internal CodingKeys
* update README.md
* remove unused StatementError
* OPABundle -> OPA.Bundle
* Manifest -> OPA.Manifest
* add documentation tags for some top-level types
* Engine -> OPA.Engine
* InMemStore -> OPA.InMemStore
* group tracing types under OPA.Trace
* BuiltinError -> enum
Signed-off-by: Oren Shomron <[email protected]>1 parent 947b7e5 commit 2bf8b3f
File tree
69 files changed
+1309
-2264
lines changed- Benchmarks/RegoBenchmarks
- TestData
- Sources
- AST
- CLI
- IR
- Rego
- Builtins
- Runtime
- SwiftOPA
- SwiftRego
- Tests
- RegoTests
- BuiltinTests
- SwiftOPATests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
69 files changed
+1309
-2264
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
This file was deleted.
0 commit comments