v1

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package v1 implements the v1 API for the Open Policy Agent (OPA). The v1 API defaults to enforcing the v1 Rego syntax (github.com/open-policy-agent/opa/v1/ast.RegoV1). Most packages outside the v1 API are deprecated. These constitute the older v0 API, which defaults to the v0 Rego syntax (github.com/open-policy-agent/opa/v1/ast.RegoV0). The v0 API is provided as a means to ease transition to OPA 1.0 for 3rd party integrations, see [TODO: LINK TO V0 MIGRATION GUIDE].

Directories

Path Synopsis
ast
Package ast declares Rego syntax tree types and also includes a parser and compiler for preparing policies for execution in the policy engine.
Package ast declares Rego syntax tree types and also includes a parser and compiler for preparing policies for execution in the policy engine.
json
This package provides options for JSON marshalling of AST nodes, and location data in particular.
This package provides options for JSON marshalling of AST nodes, and location data in particular.
location
Package location defines locations in Rego source code.
Package location defines locations in Rego source code.
Package bundle implements bundle loading.
Package bundle implements bundle loading.
Package compile implements bundles compilation and linking.
Package compile implements bundles compilation and linking.
Package config implements OPA configuration file parsing and validation.
Package config implements OPA configuration file parsing and validation.
Package cover reports coverage on modules.
Package cover reports coverage on modules.
Package debug EXPERIMENTAL: This package is under active development and is subject to change.
Package debug EXPERIMENTAL: This package is under active development and is subject to change.
Package dependencies provides functions for determining the set of ast.Refs that AST elements depend on.
Package dependencies provides functions for determining the set of ast.Refs that AST elements depend on.
Package download implements low-level OPA bundle downloading.
Package download implements low-level OPA bundle downloading.
features
wasm
Import this package to enable evaluation of rego code using the built-in wasm engine.
Import this package to enable evaluation of rego code using the built-in wasm engine.
Package format implements formatting of Rego source files.
Package format implements formatting of Rego source files.
Package ir defines an intermediate representation (IR) for Rego.
Package ir defines an intermediate representation (IR) for Rego.
Package loader contains utilities for loading files into OPA.
Package loader contains utilities for loading files into OPA.
Package metrics contains helpers for performance metric management inside the policy engine.
Package metrics contains helpers for performance metric management inside the policy engine.
Package plugins implements plugin management for the policy engine.
Package plugins implements plugin management for the policy engine.
bundle
Package bundle implements bundle loading.
Package bundle implements bundle loading.
discovery
Package discovery implements configuration discovery.
Package discovery implements configuration discovery.
logs
Package logs implements decision log buffering and uploading.
Package logs implements decision log buffering and uploading.
rest
Package rest implements a REST client for communicating with remote services.
Package rest implements a REST client for communicating with remote services.
server/decoding
Package decoding implements the configuration side of the upgraded gzip decompression framework.
Package decoding implements the configuration side of the upgraded gzip decompression framework.
status
Package status implements status reporting.
Package status implements status reporting.
Package profiler computes and reports on the time spent on expressions.
Package profiler computes and reports on the time spent on expressions.
Package refactor implements different refactoring operations over Rego modules.
Package refactor implements different refactoring operations over Rego modules.
Package rego exposes high level APIs for evaluating Rego policies.
Package rego exposes high level APIs for evaluating Rego policies.
Package repl implements a Read-Eval-Print-Loop (REPL) for interacting with the policy engine.
Package repl implements a Read-Eval-Print-Loop (REPL) for interacting with the policy engine.
Package runtime contains the entry point to the policy engine.
Package runtime contains the entry point to the policy engine.
sdk
Package sdk contains a high-level API for embedding OPA inside of Go programs.
Package sdk contains a high-level API for embedding OPA inside of Go programs.
Package server contains the policy engine's server handlers.
Package server contains the policy engine's server handlers.
authorizer
Package authorizer provides authorization handlers to the server.
Package authorizer provides authorization handlers to the server.
identifier
Package identifier provides handlers for associating identity information with incoming requests.
Package identifier provides handlers for associating identity information with incoming requests.
types
Package types contains request/response types and codes for the server.
Package types contains request/response types and codes for the server.
writer
Package writer contains utilities for writing responses in the server.
Package writer contains utilities for writing responses in the server.
Package storage exposes the policy engine's storage layer.
Package storage exposes the policy engine's storage layer.
disk
Package disk provides disk-based implementation of the storage.Store interface.
Package disk provides disk-based implementation of the storage.Store interface.
inmem
Package inmem implements an in-memory version of the policy engine's storage layer.
Package inmem implements an in-memory version of the policy engine's storage layer.
internal/errors
Package errors contains reusable error-related code for the storage layer.
Package errors contains reusable error-related code for the storage layer.
internal/ptr
Package ptr provides utilities for pointer operations using storage layer paths.
Package ptr provides utilities for pointer operations using storage layer paths.
test
authz
Package authz contains unit and benchmark tests for authz use-cases The public (non-test) APIs are meant to be used as helpers for other tests to build off of.
Package authz contains unit and benchmark tests for authz use-cases The public (non-test) APIs are meant to be used as helpers for other tests to build off of.
cases
Package cases contains utilities for evaluation test cases.
Package cases contains utilities for evaluation test cases.
e2e
e2e/authz
nolint: deadcode,unused // build tags confuse these linters
nolint: deadcode,unused // build tags confuse these linters
e2e/wasm/authz
nolint: deadcode,unused // build tags confuse these linters
nolint: deadcode,unused // build tags confuse these linters
Package tester contains utilities for executing Rego tests.
Package tester contains utilities for executing Rego tests.
Package topdown provides low-level query evaluation support.
Package topdown provides low-level query evaluation support.
builtins
Package builtins contains utilities for implementing built-in functions.
Package builtins contains utilities for implementing built-in functions.
cache
Package cache defines the inter-query cache interface that can cache data across queries
Package cache defines the inter-query cache interface that can cache data across queries
Package tracing enables dependency-injection at runtime.
Package tracing enables dependency-injection at runtime.
Package types declares data types for Rego values and helper functions to operate on these types.
Package types declares data types for Rego values and helper functions to operate on these types.
Package util provides generic utilities used throughout the policy engine.
Package util provides generic utilities used throughout the policy engine.
test
Package test contains utilities used in the policy engine's test suite.
Package test contains utilities used in the policy engine's test suite.
Package version contains version information that is set at build time.
Package version contains version information that is set at build time.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL