engine

package
v0.0.0-...-f328a8e Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePolicyEnv

func CreatePolicyEnv() (*cel.Env, error)

func CreateRuleEnv

func CreateRuleEnv() (*cel.Env, error)

Types

type RuleEngine

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

func NewRuleEngine

func NewRuleEngine() (*RuleEngine, error)

func (*RuleEngine) AddPolicy

func (re *RuleEngine) AddPolicy(policy models.Policy) error

func (*RuleEngine) DeletePolicy

func (re *RuleEngine) DeletePolicy(id string) error

func (*RuleEngine) EvaluatePolicy

func (re *RuleEngine) EvaluatePolicy(policyID string, input map[string]interface{}) (string, []models.RuleResult, error)

func (*RuleEngine) GetAllPolicies

func (re *RuleEngine) GetAllPolicies() []models.Policy

func (*RuleEngine) GetPolicy

func (re *RuleEngine) GetPolicy(id string) (models.Policy, error)

Jump to

Keyboard shortcuts

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