opa

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Capabilities added in v0.10.0

func Capabilities() (*ast.Capabilities, error)

Types

type InventoryResult

type InventoryResult struct {
	BuildDependencies   []string `json:"build_dependencies"`
	PackageDependencies []string `json:"package_dependencies"`
}

type Opa

type Opa struct {
	Compiler  *ast.Compiler
	Store     storage.Store
	LoadPaths []string
	// contains filtered or unexported fields
}

func NewOpa

func NewOpa(ctx context.Context, config *models.Config) (*Opa, error)

func NewOpaWithEmbeddedRules added in v1.0.2

func NewOpaWithEmbeddedRules(ctx context.Context, config *models.Config, customFS embed.FS) (*Opa, error)

NewOpaWithEmbeddedRules creates a new Opa instance with custom embedded Rego rules. This allows library consumers to embed their own Rego rules directly in their binaries alongside Poutine's built-in rules, creating fully self-contained deployments.

Example usage:

//go:embed rules
var CustomRules embed.FS

opa, err := poutineOpa.NewOpaWithEmbeddedRules(ctx, config, CustomRules)

func (*Opa) Compile added in v0.10.0

func (o *Opa) Compile(ctx context.Context, skip []string, allowed []string) error

func (*Opa) Eval

func (o *Opa) Eval(ctx context.Context, query string, input map[string]interface{}, result interface{}) error

func (*Opa) Print

func (o *Opa) Print(ctx print.Context, s string) error

func (*Opa) WithConfig added in v0.10.0

func (o *Opa) WithConfig(ctx context.Context, config *models.Config) error

Jump to

Keyboard shortcuts

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