Documentation ¶
Index ¶
- type Reporter
- type Scorer
- type Service
- type SpecAnalysisReport
- func (r *SpecAnalysisReport) Score(scoreCfg analyzer.AnalyzersScoreConfigs, ...) (int, error)
- func (r *SpecAnalysisReport) WithMitigation(analyzerRules map[analyzer.SpecAnalyzer]map[rule.SeverityName][]*analyzer.Rule) *SpecAnalysisReport
- func (r *SpecAnalysisReport) WithScore(scoreCfg analyzer.AnalyzersScoreConfigs, ...) (*SpecAnalysisReport, error)
- type SpecReport
- func (r *SpecReport) Score(scoreCfg analyzer.AnalyzersScoreConfigs, ...) (int, error)
- func (r *SpecReport) WithMitigation(analyzerRules map[analyzer.SpecAnalyzer]map[rule.SeverityName][]*analyzer.Rule) *SpecReport
- func (r *SpecReport) WithScore(scoreCfg analyzer.AnalyzersScoreConfigs, ...) (*SpecReport, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reporter ¶
type Reporter interface { GenerateSpecReport(spec *models.Spec, specAnalyses map[analyzer.SpecAnalyzer]*models.SpecAnalysis) (*SpecReport, error) GenerateSpecAnalysisReport(spec *models.Spec, specAnalysis *models.SpecAnalysis) (*SpecAnalysisReport, error) }
func NewReporter ¶
func NewReporter(scoreCfg analyzer.AnalyzersScoreConfigs, analyzers map[analyzer.SpecAnalyzer]*analyzer.Analyzer) (Reporter, error)
type Scorer ¶
type Scorer interface {
Score(scoreCfg analyzer.AnalyzersScoreConfigs, analyzerRules map[analyzer.SpecAnalyzer]map[rule.SeverityName][]*analyzer.Rule) (int, error)
}
type Service ¶
type Service interface { Analyze(req *models.SpecAnalysisRequest) (*models.SpecAnalysisResponse, error) Reporter(optionalAnalyzers map[analyzer.SpecAnalyzer]*analyzer.Analyzer) (Reporter, error) }
type SpecAnalysisReport ¶
type SpecAnalysisReport struct {
// contains filtered or unexported fields
}
SpecAnalysisReport represents a report of a models.SpecAnalysis.
func NewSpecAnalysisReport ¶
func NewSpecAnalysisReport(specAnalysis *models.SpecAnalysis, spec *models.Spec) *SpecAnalysisReport
func (*SpecAnalysisReport) Score ¶
func (r *SpecAnalysisReport) Score(scoreCfg analyzer.AnalyzersScoreConfigs, analyzerRules map[analyzer.SpecAnalyzer]map[rule.SeverityName][]*analyzer.Rule) (int, error)
func (*SpecAnalysisReport) WithMitigation ¶
func (r *SpecAnalysisReport) WithMitigation(analyzerRules map[analyzer.SpecAnalyzer]map[rule.SeverityName][]*analyzer.Rule) *SpecAnalysisReport
func (*SpecAnalysisReport) WithScore ¶
func (r *SpecAnalysisReport) WithScore(scoreCfg analyzer.AnalyzersScoreConfigs, analyzerRules map[analyzer.SpecAnalyzer]map[rule.SeverityName][]*analyzer.Rule) (*SpecAnalysisReport, error)
type SpecReport ¶
type SpecReport struct {
// contains filtered or unexported fields
}
func NewSpecReport ¶
func NewSpecReport(spec *models.Spec, specAnalyses map[analyzer.SpecAnalyzer]*models.SpecAnalysis) *SpecReport
func (*SpecReport) Score ¶
func (r *SpecReport) Score(scoreCfg analyzer.AnalyzersScoreConfigs, analyzerRules map[analyzer.SpecAnalyzer]map[rule.SeverityName][]*analyzer.Rule) (int, error)
func (*SpecReport) WithMitigation ¶
func (r *SpecReport) WithMitigation(analyzerRules map[analyzer.SpecAnalyzer]map[rule.SeverityName][]*analyzer.Rule) *SpecReport
func (*SpecReport) WithScore ¶
func (r *SpecReport) WithScore(scoreCfg analyzer.AnalyzersScoreConfigs, analyzerRules map[analyzer.SpecAnalyzer]map[rule.SeverityName][]*analyzer.Rule) (*SpecReport, error)
Click to show internal directories.
Click to hide internal directories.