opa

package
Version: v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2020 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Evaluator

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

func New

func New(moduleName string, query string, opts ...Option) (eval *Evaluator, err error)

func (*Evaluator) Evaluate

func (e *Evaluator) Evaluate(ctx context.Context, inputs interface{}) (pass bool, err error)

type Option

type Option func(*Options) error

Option configures the opa system

func File

func File(f string) Option

File sets the file to read the policy from, mutually exclusive with Policy()

func Function

func Function(fs ...func(*rego.Rego)) Option

Function adds functions to the rego ast

func Logger

func Logger(log *logrus.Entry) Option

Logger sets the logger to use

func Policy

func Policy(p []byte) Option

Policy sets the contents of the policy to evaluate, mutually exclusive with File()

func Trace

func Trace() Option

Trace enables tracing of rego evaluation

type Options

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

Options are configuration options for the opa system

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL