scorecard

package
v0.0.0-...-f7d4827 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Grade

type Grade int
const (
	GradeCritical Grade = 1
	GradeWarning  Grade = 5
	GradeAlmostOK Grade = 7
	GradeAllOK    Grade = 10
)

func (Grade) String

func (g Grade) String() string

type Scorecard

type Scorecard map[string]*ScoredObject

func New

func New() Scorecard

New creates and initializes a new Scorecard

func (Scorecard) AnyBelowOrEqualToGrade

func (s Scorecard) AnyBelowOrEqualToGrade(threshold Grade) bool

func (Scorecard) NewObject

func (s Scorecard) NewObject(typeMeta metav1.TypeMeta, objectMeta metav1.ObjectMeta, cnf *config.RunConfiguration) *ScoredObject

type ScoredObject

type ScoredObject struct {
	TypeMeta     metav1.TypeMeta
	ObjectMeta   metav1.ObjectMeta
	FileLocation ks.FileLocation
	Checks       []TestScore
	// contains filtered or unexported fields
}

func (*ScoredObject) Add

func (so *ScoredObject) Add(ts TestScore, check ks.Check, locationer ks.FileLocationer, annotations ...map[string]string)

func (*ScoredObject) AnyBelowOrEqualToGrade

func (so *ScoredObject) AnyBelowOrEqualToGrade(threshold Grade) bool

func (*ScoredObject) HumanFriendlyRef

func (so *ScoredObject) HumanFriendlyRef() string

type TestScore

type TestScore struct {
	Check    ks.Check
	Grade    Grade
	Skipped  bool
	Comments []TestScoreComment
}

func (*TestScore) AddComment

func (ts *TestScore) AddComment(path, summary, description string)

func (*TestScore) AddCommentWithURL

func (ts *TestScore) AddCommentWithURL(path, summary, description, documentationURL string)

type TestScoreComment

type TestScoreComment struct {
	Path             string
	Summary          string
	Description      string
	DocumentationURL string
}

Jump to

Keyboard shortcuts

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