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 ¶
type CiEvaluator struct { Rules []CiRule Results map[string]RuleResult Tally ResultTally Pass bool Misconfigured bool InefficientFiles []ReferenceFile }
func NewCiEvaluator ¶
func NewCiEvaluator(config *viper.Viper) *CiEvaluator
func (*CiEvaluator) Evaluate ¶
func (ci *CiEvaluator) Evaluate(analysis *image.AnalysisResult) bool
func (*CiEvaluator) Report ¶
func (ci *CiEvaluator) Report() string
type CiRule ¶
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 ¶
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 ¶
func (rule *GenericCiRule) Validate() error
type ReferenceFile ¶
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.