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