Documentation
¶
Index ¶
Constants ¶
View Source
const ( RuleUnknown = iota RulePassed RuleFailed RuleWarning RuleDisabled RuleMisconfigured RuleConfigured )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CiEvaluator ¶ added in v0.8.0
type CiEvaluator struct {
Rules []CiRule
Results map[string]RuleResult
Tally ResultTally
Pass bool
Misconfigured bool
InefficientFiles []ReferenceFile
}
func NewCiEvaluator ¶ added in v0.8.0
func NewCiEvaluator(config *viper.Viper) *CiEvaluator
func (*CiEvaluator) Evaluate ¶ added in v0.8.0
func (ci *CiEvaluator) Evaluate(analysis *image.AnalysisResult) bool
func (*CiEvaluator) Report ¶ added in v0.8.0
func (ci *CiEvaluator) Report()
type CiRule ¶ added in v0.8.0
type CiRule interface {
Key() string
Configuration() string
Validate() error
Evaluate(*image.AnalysisResult) (RuleStatus, string)
}
type GenericCiRule ¶ added in v0.8.0
type GenericCiRule struct {
// contains filtered or unexported fields
}
func (*GenericCiRule) Configuration ¶ added in v0.8.0
func (rule *GenericCiRule) Configuration() string
func (*GenericCiRule) Evaluate ¶ added in v0.8.0
func (rule *GenericCiRule) Evaluate(result *image.AnalysisResult) (RuleStatus, string)
func (*GenericCiRule) Key ¶ added in v0.8.0
func (rule *GenericCiRule) Key() string
func (*GenericCiRule) Validate ¶ added in v0.8.0
func (rule *GenericCiRule) Validate() error
type ReferenceFile ¶ added in v0.8.0
type ResultTally ¶ added in v0.8.0
type RuleResult ¶ added in v0.8.0
type RuleResult struct {
// contains filtered or unexported fields
}
type RuleStatus ¶ added in v0.8.0
type RuleStatus int
func (RuleStatus) String ¶ added in v0.8.0
func (status RuleStatus) String() string
Click to show internal directories.
Click to hide internal directories.