rego_policies

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RegoPolicyManager

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

RegoPolicyManager contains everything required to create and manage rego contexts

func NewRegoPolicyManager

func NewRegoPolicyManager() *RegoPolicyManager

NewRegoPolicyManager creates a new rego instance to manage policies

func (*RegoPolicyManager) AddBuiltinFunc1

func (rpm *RegoPolicyManager) AddBuiltinFunc1(
	name string,
	signature *types.Function,
	impl rego.Builtin1,
)

AddBuiltinFunc1 for rego, callable by policies

func (*RegoPolicyManager) AddBuiltinFunc2

func (rpm *RegoPolicyManager) AddBuiltinFunc2(
	name string,
	signature *types.Function,
	impl rego.Builtin2,
)

AddBuiltinFunc2 for rego, callable by policies

func (*RegoPolicyManager) LoadBundle

func (rpm *RegoPolicyManager) LoadBundle(path string) error

LoadBundle from a folder. It searches the entire folder and includes all .rego files that are in the top level

func (*RegoPolicyManager) LoadBundleFromRemote added in v1.2.0

func (rpm *RegoPolicyManager) LoadBundleFromRemote(url string) error

func (*RegoPolicyManager) LoadModuleFromFile

func (rpm *RegoPolicyManager) LoadModuleFromFile(path string) error

LoadModuleFromFile given path and read contents

func (*RegoPolicyManager) LoadModuleFromString

func (rpm *RegoPolicyManager) LoadModuleFromString(path string, content string) error

LoadModuleFromString given path and content

func (*RegoPolicyManager) NewRegoCtx

func (rpm *RegoPolicyManager) NewRegoCtx() *rego.Rego

NewRegoCtx creates a new rego instanced based on manager configuration

Jump to

Keyboard shortcuts

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