Documentation ¶
Index ¶
- func GetReport(db *gorm.DB, id uint) (*model.Report, error)
- func InsertReport(db *gorm.DB, report *model.Report) error
- type GormScanManager
- func (manager *GormScanManager) GetScan(ctx context.Context, id uint) (*model.Scan, error)
- func (manager *GormScanManager) InsertPackageScans(ctx context.Context, dto *external.PackageDTO) error
- func (manager *GormScanManager) InsertReport(ctx context.Context, report *model.Report) error
- func (manager *GormScanManager) InsertScan(ctx context.Context, dto *external.ScanDTO) error
- func (manager *GormScanManager) UpdateScan(ctx context.Context, dto *external.ScanDTO) error
- type PackageManager
- type ScanManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GormScanManager ¶
type GormScanManager struct {
// contains filtered or unexported fields
}
GormScanManager implements the ScanManager interface using a GORM DB connection.
func NewGormScanManager ¶
func NewGormScanManager(db *gorm.DB) (*GormScanManager, error)
NewGormScanManager creates a new GormScanManager.
func (*GormScanManager) GetScan ¶
GetScan retrieves a Scan and its associated Vulnerabilities from the database.
func (*GormScanManager) InsertPackageScans ¶ added in v0.0.8
func (manager *GormScanManager) InsertPackageScans(ctx context.Context, dto *external.PackageDTO) error
InsertPackageScans inserts a new Package and its associated Scans into the database.
func (*GormScanManager) InsertReport ¶ added in v0.0.10
InsertReport inserts a new report into the database.
func (*GormScanManager) InsertScan ¶
InsertScan inserts a new Scan and its associated Vulnerabilities into the database.
func (*GormScanManager) UpdateScan ¶
UpdateScan updates an existing Scan and its associated Vulnerabilities in the database.
type PackageManager ¶ added in v0.0.8
type PackageManager interface {
InsertPackage(ctx context.Context, dto *external.PackageDTO) error
}
type ScanManager ¶
type ScanManager interface { // InsertScan inserts a new Scan and its associated Vulnerabilities into the database. InsertScan(ctx context.Context, dto *external.ScanDTO) error // UpdateScan updates an existing Scan and its associated Vulnerabilities in the database. UpdateScan(ctx context.Context, dto *external.ScanDTO) error // GetScan retrieves a Scan and its associated Vulnerabilities from the database. GetScan(ctx context.Context, id uint) (*model.Scan, error) }
ScanManager defines the interface for managing scans in the database.
Click to show internal directories.
Click to hide internal directories.