Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
nolint:staticcheck
Functions ¶
Types ¶
type Badge ¶
type Badge struct {
BadgeName string `json:"badgeName"`
BadgeID string `json:"badgeId"`
BadgeLevel string `json:"badgeLevel"`
BadgeURL string `json:"badgeUrl"`
BadgeGranted bool `json:"badgeGranted"`
BadgeInformationURI string `json:"badgeInformationUri"`
IsHighestGrantedBadge bool `json:"isHighestGrantedBadge"`
BadgeExplanation BadgeExplanation `json:"badgeExplanation"`
BadgeDescription string `json:"badgeDescription"`
}
func Eval ¶
func Eval(repositoryURL string, observations []observe.Observation, badgeConfig []config.BadgeConfig) []Badge
type Criteria ¶
type Criteria struct {
Description string `json:"description"`
Value any `json:"value"`
Status Status `json:"status"`
RuleID string `json:"ruleId"`
Threshold config.ThresholdConfig `json:"threshold,omitempty"`
BadgeID string `json:"badgeId"`
BadgeLevel string `json:"badgeLevel"`
Evidence string `json:"evidence,omitempty"`
}
type Status ¶
type Status string
const ( // The rule specified by ruleId (§3.27.5), ruleIndex (§3.27.6), and/or rule (§3.27.7) // was evaluated, and no problem was found. StatusPass Status = "pass" StatusDenied Status = "fail" StatusMissingData Status = "notApplicable" // this is for checks that could not be determined due to missing data like no tickets etc. StatusTechnicalFailure Status = "open" // this is for technically failed checks )
func EvaluateAgainstThreshold ¶
func EvaluateAgainstThreshold(value observe.ObservationValue, threshold config.ThresholdConfig) Status
Source Files
¶
- badges.go
- check.go
Click to show internal directories.
Click to hide internal directories.