Versions in this module Expand all Collapse all v0 v0.0.2 Apr 22, 2026 v0.0.1 Apr 22, 2026 Changes in this version + func NewPool(ctx context.Context, databaseURL string, cfg PoolConfig) (*pgxpool.Pool, error) + func RunMigrations(pool *pgxpool.Pool) error + type PoolConfig struct + HealthCheckPeriod time.Duration + MaxConnIdleTime time.Duration + MaxConnLifetime time.Duration + MaxConns int32 + MinConns int32 + type ScanRepository struct + func NewScanRepository(pool *pgxpool.Pool) *ScanRepository + func (r *ScanRepository) CVEAffectedImages(ctx context.Context, cveID string) ([]entities.AffectedImage, error) + func (r *ScanRepository) Create(ctx context.Context, imageName, imageTag, imageDigest string, ...) (*entities.Scan, bool, error) + func (r *ScanRepository) DeleteExcessAndOld(ctx context.Context, age time.Duration, keep int) (int64, error) + func (r *ScanRepository) DeleteExcessPerImage(ctx context.Context, keep int) (int64, error) + func (r *ScanRepository) DeleteOlderThan(ctx context.Context, age time.Duration) (int64, error) + func (r *ScanRepository) FixableSummary(ctx context.Context, imageName string, from, to *time.Time) (*entities.FixableSummary, error) + func (r *ScanRepository) GetByID(ctx context.Context, id string) (*entities.Scan, error) + func (r *ScanRepository) LatestByImage(ctx context.Context, imageName string) (*entities.Scan, error) + func (r *ScanRepository) ListAllPage(ctx context.Context, imageName, tag string, limit, offset int) ([]entities.Scan, error) + func (r *ScanRepository) ListByImage(ctx context.Context, imageName string) ([]entities.Scan, error) + func (r *ScanRepository) ListByImagePage(ctx context.Context, imageName string, limit, offset int) ([]entities.Scan, error) + func (r *ScanRepository) ListByImageWithSeverity(ctx context.Context, imageName, severity string) ([]entities.Scan, error) + func (r *ScanRepository) ListByImageWithSeverityPage(ctx context.Context, imageName, severity string, limit, offset int) ([]entities.Scan, error) + func (r *ScanRepository) ListByTag(ctx context.Context, tag string) ([]entities.Scan, error) + func (r *ScanRepository) ListByTagPage(ctx context.Context, tag string, limit, offset int) ([]entities.Scan, error) + func (r *ScanRepository) TopCVEs(ctx context.Context, imageName, severity string, limit int, ...) ([]entities.TopCVE, error) + func (r *ScanRepository) VulnerabilitySummary(ctx context.Context, imageName string, from, to *time.Time) (*entities.VulnerabilitySummary, error) + func (r *ScanRepository) VulnerabilityTrends(ctx context.Context, imageName, bucket string, from, to *time.Time) ([]entities.VulnerabilityTrendPoint, error)