package
1.2.0
Repository: https://github.com/open-policy-agent/opa.git
Documentation: pkg.go.dev

# Packages

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.
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.
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.
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.
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.

# Functions

GetBuiltin returns a built-in function implementation, nil if no built-in found.
IsCancel returns true if err was caused by cancellation.
IsError returns true if the err is an Error.
NewBufferTracer returns a new BufferTracer.
NewCancel returns a new Cancel object.
NewInstrumentation returns a new Instrumentation object.
NewQuery returns a new Query object that can be run.
PrettyTrace pretty prints the trace to the writer.
PrettyTraceWithLocation prints the trace to the writer and includes location information.
RegisterBuiltinFunc adds a new built-in function to the evaluation engine.
Deprecated: Functional-style builtins are deprecated.
Deprecated: Functional-style builtins are deprecated.
Deprecated: Functional-style builtins are deprecated.
Deprecated: Functional-style builtins are deprecated.
WrapLegacyTracer will create a new QueryTracer which wraps an older Tracer instance.

# Constants

BuiltinErr indicates a built-in function received a semantically invalid input or encountered some kind of runtime error, e.g., connection timeout, connection refused, etc.
CancelErr indicates the evaluation process was cancelled.
ConflictErr indicates a conflict was encountered during evaluation.
DuplicateOp is emitted when a query has produced a duplicate value.
EnterOp is emitted when a new query is about to be evaluated.
EvalOp is emitted when an expression is about to be evaluated.
ExitOp is emitted when a query has evaluated to true.
FailOp is emitted when an expression evaluates to false.
HTTPSendInternalErr represents a runtime evaluation error.
HTTPSendNetworkErr represents a network error.
IndexOp is emitted during an expression evaluation to represent lookup matches.
InternalErr represents an unknown evaluation error.
NoteOp is emitted when an expression invokes a tracing built-in function.
RedoOp is emitted when an expression, rule, or query is being re-evaluated.
SaveOp is emitted when an expression is saved instead of evaluated during partial evaluation.
TypeErr indicates evaluation stopped because an expression was applied to a value of an inappropriate type.
UnifyOp is emitted when two terms are unified.
WasmOp is emitted when resolving a ref using an external Resolver.
WithMergeErr indicates that the real and replacement data could not be merged.

# Type aliases

BufferTracer implements the Tracer and QueryTracer interface by simply buffering all events received.
Builtin represents a built-in function that queries can call.
Deprecated: The BuiltinEmpty type is no longer needed.
Cancel defines the interface for cancelling topdown queries.
Error is the error type returned by the Eval and Query functions when an evaluation error occurs.
Event contains state associated with a tracing event.
Halt is a special error type that built-in function implementations return to indicate that policy evaluation should stop immediately.
Instrumentation implements helper functions to instrument query evaluation to diagnose performance issues.
Op defines the types of tracing events.
Query provides a configurable interface for performing query evaluation.
QueryResult represents a single result returned by a query.
QueryResultSet represents a collection of results returned by a query.
QueryTracer defines the interface for tracing in the top-down evaluation engine.
TraceConfig defines some common configuration for Tracer implementations.
Tracer defines the interface for tracing in the top-down evaluation engine.
VarMetadata provides some user facing information about a variable in some policy.
VirtualCache defines the interface for a cache that stores the results of evaluated virtual documents (rules).