Documentation
¶
Overview ¶
Package trusty provides an evaluator that uses the trusty API
Package trusty provides an evaluator that uses the trusty API ¶
Package trusty provides an evaluator that uses the trusty API ¶
Package trusty provides an evaluator that uses the trusty API
Index ¶
Constants ¶
View Source
const (
// TrustyEvalType is the type of the trusty evaluator
TrustyEvalType = "trusty"
)
Variables ¶
View Source
var ( // SummaryScore is the score to use for the summary score SummaryScore = "score" // DefaultScore is the default score to use DefaultScore = "" )
Functions ¶
This section is empty.
Types ¶
type Alternative ¶
type Alternative struct { PackageName string `json:"package_name"` Score float64 `json:"score"` PackageNameURL string }
Alternative is an alternative package returned from the package intelligence API
type Evaluator ¶
type Evaluator struct {
// contains filtered or unexported fields
}
Evaluator is the trusty evaluator
func NewTrustyEvaluator ¶
NewTrustyEvaluator creates a new trusty evaluator
type Reply ¶
type Reply struct { PackageName string `json:"package_name"` PackageType string `json:"package_type"` Summary ScoreSummary `json:"summary"` Alternatives struct { Status string `json:"status"` Packages []Alternative `json:"packages"` } `json:"alternatives"` }
Reply is the response from the package intelligence API
type ScoreSummary ¶ added in v0.0.28
type ScoreSummary struct { Score float64 `json:"score"` Description map[string]any `json:"description"` }
ScoreSummary is the summary score returned from the package intelligence API
Click to show internal directories.
Click to hide internal directories.