Documentation ¶
Overview ¶
Package rules contains function for handling rule evaluation
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateRules ¶
ValidateRules validates the given rules using the given context and scope. If any rules are violated, an error is returned.
func ValidateRulesWithMessage ¶
func ValidateRulesWithMessage(ctx context.Context, scope *common.Scope, rules []*spec.Rule, writer *tabwriter.Writer, preWriteCallBack func())
ValidateRulesWithMessage validates the given rules using the given context and scope. If any rules are violated, the given preWriteCallBack function is called, and then the rule is written to the given writer.
func WriteRule ¶
WriteRule writes a human-readable description of the given rules to the given writer in a 2-column format.
Sometimes we run this in a context where we want to include the index of the rules in the list of rules; in that case, pass includeIndex=true and the index value. If includeIndex is false, then index is ignored.
Types ¶
This section is empty.