Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFailedEvaluateExpression = errors.New("could not evaluate expression")
Functions ¶
This section is empty.
Types ¶
type EvaluationResult ¶
type EvaluationResult struct {
Target *entity.TargetServer
Allowed bool
Found bool
}
type RegoEvaluator ¶ added in v0.3.0
type RegoEvaluator struct {
// contains filtered or unexported fields
}
func NewRegoEvaluator ¶
func NewRegoEvaluator(config *entity.Config, mac *entity.MacAddress, upsRepo repository.UPSRepository, ruleRepo repository.RuleRepository) *RegoEvaluator
NewRegoEvaluator creates a RegoEvaluator configured with the provided configuration, MAC address, UPS repository and rule repository. The returned evaluator uses the MAC to select matching targets, upsRepo to fetch per-server JSON input and ruleRepo to evaluate rules against that input.
func (*RegoEvaluator) EvaluateExpressions ¶ added in v0.3.0
func (r *RegoEvaluator) EvaluateExpressions() (*EvaluationResult, error)
Click to show internal directories.
Click to hide internal directories.