rules

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName              = "MODULE_NAME"
	ModuleSlug              = "MODULE_SLUG"
	ModuleType              = "MODULE_TYPE"
	ModuleBuildSystem       = "MODULE_BUILD_SYSTEM"
	ModuleBuildSystemSyntax = "MODULE_BUILD_SYSTEM_SYNTAX"
	ModuleConfigType        = "MODULE_CONFIG_TYPE"
	ModuleSpecificationType = "MODULE_SPECIFICATION_TYPE"
	ModuleDeploymentSpec    = "MODULE_DEPLOYMENT_SPEC"
	ModuleDeploymentType    = "MODULE_DEPLOYMENT_TYPE"
	ModuleFiles             = "MODULE_FILES"
)

Variables

Functions

func AnyRuleMatches

func AnyRuleMatches(rules []catalog.WorkflowRule, evalContext map[string]interface{}) bool

AnyRuleMatches will return true if at least one rule matches, if no rules are provided this always returns true

func EvaluateRule

func EvaluateRule(rule catalog.WorkflowRule, evalContext map[string]interface{}) bool

EvaluateRule will evaluate a WorkflowRule and return the result

func EvaluateRules

func EvaluateRules(rules []catalog.WorkflowRule, evalContext map[string]interface{}) int

EvaluateRules will check all rules and returns the count of matching rules

func EvaluateRulesAsText

func EvaluateRulesAsText(rules []catalog.WorkflowRule, evalContext map[string]interface{}) string

EvaluateRulesAsText will check all rules and returns the count of matching rules in the following format: 2/5

func GetModuleRuleContext

func GetModuleRuleContext(env map[string]string, module *analyzerapi.ProjectModule) map[string]interface{}

func GetProjectRuleContext added in v0.4.1

func GetProjectRuleContext(env map[string]string, modules []*analyzerapi.ProjectModule) map[string]interface{}

func GetRuleContext

func GetRuleContext(env map[string]string) map[string]interface{}

Types

This section is empty.

Jump to

Keyboard shortcuts

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