Documentation ¶
Index ¶
- func GetStatusIcon(status Status) rune
- type CheckResult
- func AcceptedCheckResult(message string, target Target) CheckResult
- func ErroredCheckResult(message string, target Target) CheckResult
- func FailedCheckResult(message string, target Target) CheckResult
- func NotImplementedCheckResult(message string, target Target) CheckResult
- func PassedCheckResult(message string, target Target) CheckResult
- func SkippedCheckResult(message string, target Target) CheckResult
- func WarningCheckResult(message string, target Target) CheckResult
- type Rule
- type RuleResult
- type SkipRule
- type Status
- type Target
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetStatusIcon ¶
GetStatusIcon returns the icon of a given Status string
Types ¶
type CheckResult ¶
CheckResult contains information about a Rule check. Returned from Rule runs.
func AcceptedCheckResult ¶
func AcceptedCheckResult(message string, target Target) CheckResult
AcceptedCheckResult returns a CheckResult with Accepted status and the given message and target
func ErroredCheckResult ¶
func ErroredCheckResult(message string, target Target) CheckResult
ErroredCheckResult returns a CheckResult with Errored status and the given message and target
func FailedCheckResult ¶
func FailedCheckResult(message string, target Target) CheckResult
FailedCheckResult returns a CheckResult with Failed status and the given message and target
func NotImplementedCheckResult ¶
func NotImplementedCheckResult(message string, target Target) CheckResult
NotImplementedCheckResult returns a CheckResult with v status and the given message and target
func PassedCheckResult ¶
func PassedCheckResult(message string, target Target) CheckResult
PassedCheckResult returns a CheckResult with Passed status and the given message and target
func SkippedCheckResult ¶
func SkippedCheckResult(message string, target Target) CheckResult
SkippedCheckResult returns a CheckResult with Skipped status and the given message and target
func WarningCheckResult ¶
func WarningCheckResult(message string, target Target) CheckResult
WarningCheckResult returns a CheckResult with Warning status and the given message and target
type RuleResult ¶
type RuleResult struct {
RuleID, RuleName string
CheckResults []CheckResult
}
RuleResult contains a Rule identification and the results of a Rule run.
func SingleCheckResult ¶
func SingleCheckResult(r Rule, checkResult CheckResult) RuleResult
SingleCheckResult returns a RuleResult containing a single check.
type SkipRule ¶
type SkipRule struct {
// contains filtered or unexported fields
}
SkipRule is a Rule that always reports a predefined status.
func NewSkipRule ¶
NewSkipRule returns a new skipped Rule.
type Status ¶
type Status string
Status of a CheckResult
const ( // Passed status indicates that a check is satisfied. Passed Status = "Passed" // Skipped status indicates that a rule is skipped with explanation. Skipped Status = "Skipped" // Accepted status indicates that a check violation is accepted and justified // based on additional configuration. Accepted Status = "Accepted" // Warning status indicates that there is ambiguity and the check was not performed with confidence. Warning Status = "Warning" // Failed status indicates that a check reported a violation. Failed Status = "Failed" // Errored status indicates that an unexpected error occured during check execution. Errored Status = "Errored" // NotImplemented status indicates that a rule/check is not implemented. NotImplemented Status = "Not Implemented" )