Documentation ¶
Index ¶
- type RegoPolicyManager
- func (rpm *RegoPolicyManager) AddBuiltinFunc1(name string, signature *types.Function, impl rego.Builtin1)
- func (rpm *RegoPolicyManager) AddBuiltinFunc2(name string, signature *types.Function, impl rego.Builtin2)
- func (rpm *RegoPolicyManager) LoadBundle(path string) error
- func (rpm *RegoPolicyManager) LoadBundleFromRemote(url string) error
- func (rpm *RegoPolicyManager) LoadModuleFromFile(path string) error
- func (rpm *RegoPolicyManager) LoadModuleFromString(path string, content string) error
- func (rpm *RegoPolicyManager) NewRegoCtx() *rego.Rego
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
Click to show internal directories.
Click to hide internal directories.