scorer

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const EngineVersion = "7"
View Source
const MAX_SCORE float64 = 10.0

Variables

This section is empty.

Functions

func DefaultConfig added in v0.0.15

func DefaultConfig() string

Types

type Filter added in v0.0.15

type Filter struct {
	Name  string
	Ftype FilterType
}

func ReadConfigFile added in v0.0.15

func ReadConfigFile(path string) ([]Filter, error)

type FilterType added in v0.0.15

type FilterType int
const (
	Feature FilterType = iota
	Category
)

type Score

type Score interface {
	Category() string
	Feature() string
	Ignore() bool
	Score() float64
	Descr() string
	MaxScore() float64
}

type Scorer

type Scorer struct {
	// contains filtered or unexported fields
}

func NewScorer

func NewScorer(ctx context.Context, doc sbom.Document) *Scorer

func (*Scorer) AddFilter added in v0.0.15

func (s *Scorer) AddFilter(nm string, ftype FilterType)

func (*Scorer) AllScores added in v0.0.15

func (s *Scorer) AllScores() Scores

func (*Scorer) Score

func (s *Scorer) Score() Scores

type Scores

type Scores interface {
	Count() int
	AvgScore() float64
	ScoreList() []Score
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL