github.com/jlmeeker/kismatic@v1.10.1-0.20180612190640-57f9005a1f1a/pkg/inspector/rule/types.go (about) 1 package rule 2 3 // Meta contains the rule's metadata 4 type Meta struct { 5 Kind string 6 When [][]string 7 } 8 9 // GetRuleMeta returns the rule's metadata 10 func (rm Meta) GetRuleMeta() Meta { 11 return rm 12 } 13 14 // Rule is an inspector rule 15 type Rule interface { 16 Name() string 17 GetRuleMeta() Meta 18 IsRemoteRule() bool 19 Validate() []error 20 } 21 22 // Result contains the results from executing the rule 23 type Result struct { 24 // Name is the rule's name 25 Name string 26 // Success is true when the rule was asserted 27 Success bool 28 // Error message if there was an error executing the rule 29 Error string 30 // Remediation contains potential remediation steps for the rule 31 Remediation string 32 }