package refactor
import "github.com/open-policy-agent/opa/refactor"
Deprecated: This package is intended for older projects transitioning from OPA v0.x and will remain for the lifetime of OPA v1.x, but its use is not recommended. For newer features and behaviours, such as defaulting to the Rego v1 syntax, use the corresponding components in the github.com/open-policy-agent/opa/v1 package instead. See https://www.openpolicyagent.org/docs/latest/v0-compatibility/ for more information.
Package refactor implements different refactoring operations over Rego modules.
Index ¶
Types ¶
type Error ¶
Error defines the structure of errors returned by refactor.
type MoveQuery ¶
MoveQuery holds the set of Rego modules whose package paths and other references are to be rewritten as per the mapping defined in SrcDstMapping. If validate is true, the moved modules will be compiled to ensure they are valid.
type MoveQueryResult ¶
type MoveQueryResult = v1.MoveQueryResult
MoveQueryResult defines the output of a move query and holds the rewritten modules with updated packages paths and references.
type Refactor ¶
Refactor implements different refactoring operations over Rego modules eg. renaming packages.
func New ¶
func New() *Refactor
New returns a new Refactor object.
Source Files ¶
- Version
- v1.4.2 (latest)
- Published
- May 2, 2025
- Platform
- linux/amd64
- Imports
- 1 packages
- Last checked
- 4 hours ago –
Tools for package owners.