analysis

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

nolint

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IAnalysisRepository

type IAnalysisRepository interface {
	Create(analysis *horusec.Analysis, tx SQL.InterfaceWrite) error
	GetByID(analysisID uuid.UUID) (*horusec.Analysis, error)
	GetDetailsPaginated(companyID, repositoryID uuid.UUID, page, size int, initialDate,
		finalDate time.Time) (vulnDetails []dashboard.VulnDetails, err error)
	GetDetailsCount(companyID, repositoryID uuid.UUID, initialDate,
		finalDate time.Time) (count int, err error)
	GetDeveloperCount(companyID, repositoryID uuid.UUID, initialDate,
		finalDate time.Time) (count int, err error)
	GetRepositoryCount(companyID, repositoryID uuid.UUID, initialDate,
		finalDate time.Time) (count int, err error)
	GetVulnBySeverity(companyID, repositoryID uuid.UUID, initialDate,
		finalDate time.Time) (vulnBySeverity []dashboard.VulnBySeverity, err error)
	GetVulnByDeveloper(companyID, repositoryID uuid.UUID, initialDate,
		finalDate time.Time) (vulnByDeveloper []dashboard.VulnByDeveloper, err error)
	GetVulnByLanguage(companyID, repositoryID uuid.UUID, initialDate,
		finalDate time.Time) (vulnByLanguage []dashboard.VulnByLanguage, err error)
	GetVulnByRepository(companyID, repositoryID uuid.UUID, initialDate,
		finalDate time.Time) (vulnByRepository []dashboard.VulnByRepository, err error)
	GetVulnByTime(companyID, repositoryID uuid.UUID, initialDate,
		finalDate time.Time) (vulnByTime []dashboard.VulnByTime, err error)
}

func NewAnalysisRepository

func NewAnalysisRepository(databaseRead SQL.InterfaceRead, databaseWrite SQL.InterfaceWrite) IAnalysisRepository

type Mock

type Mock struct {
	mock.Mock
}

func (*Mock) Create

func (m *Mock) Create(_ *horusec.Analysis, _ SQL.InterfaceWrite) error

func (*Mock) GetByID

func (m *Mock) GetByID(_ uuid.UUID) (*horusec.Analysis, error)

func (*Mock) GetDetailsCount

func (m *Mock) GetDetailsCount(_, _ uuid.UUID, _, _ time.Time) (int, error)

func (*Mock) GetDetailsPaginated

func (m *Mock) GetDetailsPaginated(_, _ uuid.UUID, _, _ int, _, _ time.Time) ([]dashboard.VulnDetails, error)

func (*Mock) GetDeveloperCount

func (m *Mock) GetDeveloperCount(_, _ uuid.UUID, _, _ time.Time) (count int, err error)

func (*Mock) GetRepositoryCount

func (m *Mock) GetRepositoryCount(_, _ uuid.UUID, _, _ time.Time) (count int, err error)

func (*Mock) GetVulnByDeveloper

func (m *Mock) GetVulnByDeveloper(_, _ uuid.UUID, _, _ time.Time) ([]dashboard.VulnByDeveloper, error)

func (*Mock) GetVulnByLanguage

func (m *Mock) GetVulnByLanguage(_, _ uuid.UUID, _, _ time.Time) ([]dashboard.VulnByLanguage, error)

func (*Mock) GetVulnByRepository

func (m *Mock) GetVulnByRepository(_, _ uuid.UUID, _, _ time.Time) ([]dashboard.VulnByRepository, error)

func (*Mock) GetVulnBySeverity

func (m *Mock) GetVulnBySeverity(_, _ uuid.UUID, _, _ time.Time) ([]dashboard.VulnBySeverity, error)

func (*Mock) GetVulnByTime

func (m *Mock) GetVulnByTime(_, _ uuid.UUID, _, _ time.Time) ([]dashboard.VulnByTime, error)

type Repository

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

func (*Repository) Create

func (ar *Repository) Create(analysis *horusec.Analysis, tx SQL.InterfaceWrite) error

func (*Repository) GetByID

func (ar *Repository) GetByID(analysisID uuid.UUID) (*horusec.Analysis, error)

func (*Repository) GetDetailsCount

func (ar *Repository) GetDetailsCount(companyID, repositoryID uuid.UUID, initialDate,
	finalDate time.Time) (int, error)

func (*Repository) GetDetailsPaginated

func (ar *Repository) GetDetailsPaginated(companyID, repositoryID uuid.UUID, page, size int, initialDate,
	finalDate time.Time) (vulnDetails []dashboard.VulnDetails, err error)

func (*Repository) GetDeveloperCount

func (ar *Repository) GetDeveloperCount(companyID, repositoryID uuid.UUID, initialDate,
	finalDate time.Time) (int, error)

func (*Repository) GetRepositoryCount

func (ar *Repository) GetRepositoryCount(companyID, repositoryID uuid.UUID, initialDate,
	finalDate time.Time) (int, error)

func (*Repository) GetVulnByDeveloper

func (ar *Repository) GetVulnByDeveloper(companyID, repositoryID uuid.UUID, initialDate,
	finalDate time.Time) (vulnByDeveloper []dashboard.VulnByDeveloper, err error)

func (*Repository) GetVulnByLanguage

func (ar *Repository) GetVulnByLanguage(companyID, repositoryID uuid.UUID, initialDate,
	finalDate time.Time) (vulnByLanguage []dashboard.VulnByLanguage, err error)

func (*Repository) GetVulnByRepository

func (ar *Repository) GetVulnByRepository(companyID, repositoryID uuid.UUID, initialDate,
	finalDate time.Time) (vulnByRepository []dashboard.VulnByRepository, err error)

func (*Repository) GetVulnBySeverity

func (ar *Repository) GetVulnBySeverity(companyID, repositoryID uuid.UUID, initialDate,
	finalDate time.Time) (vulnBySeverity []dashboard.VulnBySeverity, err error)

func (*Repository) GetVulnByTime

func (ar *Repository) GetVulnByTime(companyID, repositoryID uuid.UUID, initialDate,
	finalDate time.Time) (vulnByTime []dashboard.VulnByTime, err error)

Jump to

Keyboard shortcuts

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