opa

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine interface {
	Evaluate(ctx context.Context, input interface{}) (bool, map[string]interface{}, error)
	Close()
}

Engine defines the policy evaluation interface

type RegoEngine

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

RegoEngine implements Engine using OPA Rego

func NewRegoEngine

func NewRegoEngine(ctx context.Context, policyPath string, query string) (*RegoEngine, error)

NewRegoEngine creates a new engine and loads policy from file query: e.g. "data.iam.decision"

func (*RegoEngine) Close

func (e *RegoEngine) Close()

func (*RegoEngine) Evaluate

func (e *RegoEngine) Evaluate(ctx context.Context, input interface{}) (bool, map[string]interface{}, error)

Jump to

Keyboard shortcuts

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