Documentation
¶
Index ¶
- func Capabilities() (*ast.Capabilities, error)
- type InventoryResult
- type Opa
- func (o *Opa) Compile(ctx context.Context, skip []string, allowed []string) error
- func (o *Opa) Eval(ctx context.Context, query string, input map[string]interface{}, ...) error
- func (o *Opa) Print(ctx print.Context, s string) error
- func (o *Opa) WithConfig(ctx context.Context, config *models.Config) error
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 Opa ¶
type Opa struct {
Compiler *ast.Compiler
Store storage.Store
LoadPaths []string
// contains filtered or unexported fields
}
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)
Click to show internal directories.
Click to hide internal directories.