vulnerability

package
v1.9.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IRepository

type IRepository interface {
	ListVulnManagementData(repositoryID uuid.UUID, page, size int, vulnSeverity severity.Severity,
		vulnType horusecEnums.VulnerabilityType, vulnHash string) (vulnManagement dto.VulnManagement, err error)
	UpdateVulnType(vulnerabilityID uuid.UUID,
		updateTypeData *dto.UpdateVulnType) (*horusec.Vulnerability, error)
	GetVulnByID(vulnerabilityID uuid.UUID) (*horusec.Vulnerability, error)
	UpdateVulnerability(vulnerability *horusec.Vulnerability) error
}

func NewManagementRepository

func NewManagementRepository(databaseRead SQL.InterfaceRead, databaseWrite SQL.InterfaceWrite) IRepository

type Mock

type Mock struct {
	mock.Mock
}

func (*Mock) GetVulnByID

func (m *Mock) GetVulnByID(_ uuid.UUID) (*horusec.Vulnerability, error)

func (*Mock) ListVulnManagementData

func (m *Mock) ListVulnManagementData(_ uuid.UUID, _, _ int, _ severity.Severity,
	_ horusecEnums.VulnerabilityType, _ string) (vulnManagement dto.VulnManagement, err error)

func (*Mock) UpdateVulnType

func (m *Mock) UpdateVulnType(_ uuid.UUID,
	_ *dto.UpdateVulnType) (*horusec.Vulnerability, error)

func (*Mock) UpdateVulnerability added in v1.8.0

func (m *Mock) UpdateVulnerability(_ *horusec.Vulnerability) error

type Repository

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

func (*Repository) GetVulnByID

func (r *Repository) GetVulnByID(vulnerabilityID uuid.UUID) (*horusec.Vulnerability, error)

func (*Repository) ListVulnManagementData

func (r *Repository) ListVulnManagementData(repositoryID uuid.UUID, page, size int, vulnSeverity severity.Severity,
	vulnType horusecEnums.VulnerabilityType, vulnHash string) (dto.VulnManagement, error)

func (*Repository) UpdateVulnType

func (r *Repository) UpdateVulnType(vulnerabilityID uuid.UUID,
	updateTypeData *dto.UpdateVulnType) (*horusec.Vulnerability, error)

func (*Repository) UpdateVulnerability added in v1.8.0

func (r *Repository) UpdateVulnerability(vulnerability *horusec.Vulnerability) error

Jump to

Keyboard shortcuts

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