Documentation ¶
Overview ¶
Import this package to enable evaluation of rego code using the built-in wasm engine.
Index ¶
- type OPA
- func (o *OPA) Close()
- func (o *OPA) Entrypoints(ctx context.Context) (map[string]int32, error)
- func (o *OPA) Eval(ctx context.Context, opts opa.EvalOpts) (*opa.Result, error)
- func (o *OPA) Init() (opa.EvalEngine, error)
- func (o *OPA) RemoveDataPath(ctx context.Context, path []string) error
- func (o *OPA) SetData(ctx context.Context, data interface{}) error
- func (o *OPA) SetDataPath(ctx context.Context, path []string, data interface{}) error
- func (o *OPA) WithDataJSON(data interface{}) opa.EvalEngine
- func (o *OPA) WithPolicyBytes(policy []byte) opa.EvalEngine
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) SetDataPath ¶
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.
Click to show internal directories.
Click to hide internal directories.