wasm

package
v0.64.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 3 Imported by: 4

Documentation

Overview

Import this package to enable evaluation of rego code using the built-in wasm engine.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OPA

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

OPA is an implementation of the OPA SDK.

func (*OPA) Close

func (o *OPA) Close()

func (*OPA) Entrypoints

func (o *OPA) Entrypoints(ctx context.Context) (map[string]int32, error)

func (*OPA) Eval

func (o *OPA) Eval(ctx context.Context, opts opa.EvalOpts) (*opa.Result, error)

Eval evaluates the policy.

func (*OPA) Init

func (o *OPA) Init() (opa.EvalEngine, error)

Init initializes the OPA instance.

func (*OPA) RemoveDataPath

func (o *OPA) RemoveDataPath(ctx context.Context, path []string) error

func (*OPA) SetData

func (o *OPA) SetData(ctx context.Context, data interface{}) error

func (*OPA) SetDataPath

func (o *OPA) SetDataPath(ctx context.Context, path []string, data interface{}) error

func (*OPA) WithDataJSON

func (o *OPA) WithDataJSON(data interface{}) opa.EvalEngine

WithDataJSON configures the JSON data to load.

func (*OPA) WithPolicyBytes

func (o *OPA) WithPolicyBytes(policy []byte) opa.EvalEngine

WithPolicyBytes configures the compiled policy to load.

Jump to

Keyboard shortcuts

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