opa

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigOPA

func ConfigOPA(fileName string) func(opa *OPA) error

ConfigOPA sets the configuration file to use on the OPA instance.

func NewPolicyCompiler

func NewPolicyCompiler() opa.PolicyCompiler

Return a new instance of the default implementation of the opa.PolicyCompiler.

Types

type OPA

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

OPA represents an instance of the policy engine.

func NewOPA

func NewOPA(ctx context.Context, regosPath string, opts ...func(*OPA) error) (*OPA, error)

Returns a new OPA instance.

func (*OPA) LoadRegosFromPath

func (opa *OPA) LoadRegosFromPath(ctx context.Context, regosPath string) error

func (*OPA) PartialEvaluate

func (opa *OPA) PartialEvaluate(ctx context.Context, input interface{}, query string, opts ...func(*rego.Rego)) (*rego.PartialQueries, error)

Bool returns a boolean policy decision.

func (*OPA) Start

func (opa *OPA) Start(ctx context.Context) error

Start asynchronously starts the policy engine's plugins that download policies, report status, etc.

Jump to

Keyboard shortcuts

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