drivers

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver interface {
	Init(ctx context.Context) error

	PutModule(ctx context.Context, name string, src string) error
	// PutModules upserts a number of modules under a given prefix.
	DeleteModule(ctx context.Context, name string) (bool, error)

	IsModulesEmpty(ctx context.Context) bool

	PutData(ctx context.Context, path string, data interface{}) error
	DeleteData(ctx context.Context, path string) (bool, error)

	Query(ctx context.Context, path string, input interface{}, opts ...QueryOpt) (*Response, error)

	Dump(ctx context.Context) (string, error)
}

Driver driver for opa integration

type QueryCfg

type QueryCfg struct {
	TracingEnabled bool
}

QueryCfg configuration for QueryOpt.

type QueryOpt

type QueryOpt func(*QueryCfg)

QueryOpt options for opa query.

type Response

type Response struct {
	Trace   *string
	Input   *string
	Target  string
	Results *rego.ResultSet
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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