sqlcdb

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2026 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

sqlcdb

This directory is reserved for sqlc-generated query code.

Generation command:

cd sqlc
sqlc generate

Current Postgres store read paths now call typed wrappers in this package, aligned with sqlc/queries. The next iteration will replace wrappers with generated methods directly.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FindingRow

type FindingRow struct {
	ScanID       string
	FindingID    string
	Type         string
	Severity     string
	Title        string
	HumanSummary string
	Path         []byte
	Evidence     []byte
	Remediation  string
	CreatedAt    time.Time
}

type Queries

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

Queries is a typed SQL query wrapper that mirrors upcoming sqlc-generated methods.

func New

func New(db *sql.DB) *Queries

func (*Queries) GetRepoScan

func (q *Queries) GetRepoScan(ctx context.Context, repoScanID string) (RepoScanRow, error)

func (*Queries) GetScan

func (q *Queries) GetScan(ctx context.Context, scanID string) (ScanRow, error)

func (*Queries) ListFindings

func (q *Queries) ListFindings(ctx context.Context, limit int) ([]FindingRow, error)

func (*Queries) ListFindingsByScan

func (q *Queries) ListFindingsByScan(ctx context.Context, scanID string, limit int) ([]FindingRow, error)

func (*Queries) ListRepoFindings

func (q *Queries) ListRepoFindings(ctx context.Context, repoScanID string, severity string, findingType string, limit int) ([]RepoFindingRow, error)

func (*Queries) ListRepoScans

func (q *Queries) ListRepoScans(ctx context.Context, limit int) ([]RepoScanRow, error)

func (*Queries) ListScanEvents

func (q *Queries) ListScanEvents(ctx context.Context, scanID string, limit int) ([]ScanEventRow, error)

func (*Queries) ListScans

func (q *Queries) ListScans(ctx context.Context, limit int) ([]ScanRow, error)

type RepoFindingRow

type RepoFindingRow struct {
	RepoScanID   string
	FindingID    string
	Type         string
	Severity     string
	Title        string
	HumanSummary string
	Path         []byte
	Evidence     []byte
	Remediation  string
	CreatedAt    time.Time
}

type RepoScanRow

type RepoScanRow struct {
	ID             string
	Repository     string
	Status         string
	StartedAt      time.Time
	FinishedAt     *time.Time
	CommitsScanned int
	FilesScanned   int
	FindingCount   int
	Truncated      bool
	ErrorMessage   string
}

type ScanEventRow

type ScanEventRow struct {
	ID        string
	ScanID    string
	Level     string
	Message   string
	Metadata  []byte
	CreatedAt time.Time
}

type ScanRow

type ScanRow struct {
	ID              string
	Provider        string
	Status          string
	StartedAt       time.Time
	FinishedAt      *time.Time
	AssetCount      int
	FindingCount    int
	ErrorMessage    string
	RetryCount      int
	MaxRetryCount   int
	FailureCategory string
	NextRetryAt     *time.Time
	DeadLettered    bool
	DeadLetteredAt  *time.Time
}

Jump to

Keyboard shortcuts

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