opa

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package opa provides an Open Policy Agent (OPA) policy engine adapter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client evaluates policies through OPA's REST API.

func New

func New(cfg Config) (*Client, error)

New creates a new OPA adapter.

func (*Client) Evaluate

Evaluate calls OPA with the given policy request.

type Config

type Config struct {
	DecisionURL  string
	BaseURL      string
	DecisionPath string
	Headers      map[string]string
	Client       *http.Client
	Timeout      time.Duration
	ResultKey    string
}

Config configures the OPA adapter.

Jump to

Keyboard shortcuts

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