db

package
v0.91.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CreateTablesQuery string

Functions

This section is empty.

Types

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type InsertPackageParams

type InsertPackageParams struct {
	Platform       string
	Organisation   string
	Repo           string
	PackageName    string
	Version        sql.NullString
	CurrentVersion sql.NullString
	PackageType    string
}

type Owner added in v0.65.0

type Owner struct {
	Platform     string
	Organisation string
	Repo         string
	Owner        string
	Notes        sql.NullString
	UpdatedAt    string
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) InsertPackage

func (q *Queries) InsertPackage(ctx context.Context, arg InsertPackageParams) error

func (*Queries) QueryGolangCILint added in v0.65.0

func (q *Queries) QueryGolangCILint(ctx context.Context) ([]QueryGolangCILintRow, error)

func (*Queries) QueryMostPopularDockerImages added in v0.65.0

func (q *Queries) QueryMostPopularDockerImages(ctx context.Context) ([]QueryMostPopularDockerImagesRow, error)

func (*Queries) QueryMostPopularPackageManagers added in v0.65.0

func (q *Queries) QueryMostPopularPackageManagers(ctx context.Context) ([]QueryMostPopularPackageManagersRow, error)

func (*Queries) RetrieveDistinctPackages added in v0.44.0

func (q *Queries) RetrieveDistinctPackages(ctx context.Context) ([]RetrieveDistinctPackagesRow, error)

func (*Queries) RetrieveDistinctPackagesWithoutSensitivePackages added in v0.47.0

func (q *Queries) RetrieveDistinctPackagesWithoutSensitivePackages(ctx context.Context) ([]RetrieveDistinctPackagesWithoutSensitivePackagesRow, error)

func (*Queries) RetrieveReposAndPackagesForMissingData added in v0.46.0

func (q *Queries) RetrieveReposAndPackagesForMissingData(ctx context.Context) ([]Sbom, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

type QueryGolangCILintRow added in v0.65.0

type QueryGolangCILintRow struct {
	Platform     string
	Organisation string
	Repo         string
	Owner        sql.NullString
}

type QueryMostPopularDockerImagesRow added in v0.65.0

type QueryMostPopularDockerImagesRow struct {
	PackageName string
	Count       int64
}

type QueryMostPopularPackageManagersRow added in v0.65.0

type QueryMostPopularPackageManagersRow struct {
	PackageType string
	Count       int64
}

type RetrieveDistinctPackagesRow added in v0.44.0

type RetrieveDistinctPackagesRow struct {
	PackageName    string
	Version        sql.NullString
	CurrentVersion sql.NullString
	PackageType    string
}

type RetrieveDistinctPackagesWithoutSensitivePackagesRow added in v0.47.0

type RetrieveDistinctPackagesWithoutSensitivePackagesRow struct {
	PackageName    string
	Version        sql.NullString
	CurrentVersion sql.NullString
	PackageType    string
}

type Sbom

type Sbom struct {
	Platform       string
	Organisation   string
	Repo           string
	PackageName    string
	Version        sql.NullString
	CurrentVersion sql.NullString
	PackageType    string
}

type SensitivePackage added in v0.47.0

type SensitivePackage struct {
	PackagePattern string
	PackageManager sql.NullString
	MatchStrategy  string
}

Jump to

Keyboard shortcuts

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