analysis

package
v0.0.0-...-46e61fc Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analysis

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

func (*Analysis) CreateFullAnalysis

func (a *Analysis) CreateFullAnalysis(newAnalysis *analysis.Analysis) error

func (*Analysis) FindAllVulnerabilitiesByHashesAndRepository

func (a *Analysis) FindAllVulnerabilitiesByHashesAndRepository(hashes []string,
	repositoryID uuid.UUID) response.IResponse

func (*Analysis) FindAnalysisByID

func (a *Analysis) FindAnalysisByID(analysisID uuid.UUID) response.IResponse

func (*Analysis) SaveTreatCompatibility deprecated

func (a *Analysis) SaveTreatCompatibility(mapHashToVulnerabilityID map[string]uuid.UUID,
	newAnalysis *analysis.Analysis) error

Deprecated: SaveTreatCompatibility starts a transaction and try to execute the raw query into database. is not recommended using this and the method will not be available after cli v2.10.0. The mapHashToVulnerabilityID param is the deprecated hash on the key and its value is vulnerabilityID founded in database the newAnalysis param is required to compare if exists deprecated hash from analysis and to update in database. nolint:funlen // funlen is not necessary in deprecated hash

type IAnalysis

type IAnalysis interface {
	FindAnalysisByID(analysisID uuid.UUID) response.IResponse
	CreateFullAnalysis(newAnalysis *analysis.Analysis) error
	FindAllVulnerabilitiesByHashesAndRepository(hashes []string, repositoryID uuid.UUID) response.IResponse
	SaveTreatCompatibility(mapHashToVulnerabilityID map[string]uuid.UUID, newAnalysis *analysis.Analysis) error
}

func NewRepositoriesAnalysis

func NewRepositoriesAnalysis(connection *database.Connection) IAnalysis

type Mock

type Mock struct {
	mock.Mock
}

func (*Mock) CreateFullAnalysis

func (m *Mock) CreateFullAnalysis(analysisArgument *analysis.Analysis) error

func (*Mock) FindAllVulnerabilitiesByHashesAndRepository

func (m *Mock) FindAllVulnerabilitiesByHashesAndRepository(_ []string, _ uuid.UUID) response.IResponse

func (*Mock) FindAnalysisByID

func (m *Mock) FindAnalysisByID(_ uuid.UUID) response.IResponse

func (*Mock) SaveTreatCompatibility

func (m *Mock) SaveTreatCompatibility(_ map[string]uuid.UUID, _ *analysis.Analysis) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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