db

package
v0.111.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 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 ComponentMetadatum added in v0.100.0

type ComponentMetadatum struct {
	ComponentName       string
	ParentComponentName sql.NullString
	Platform            sql.NullString
	Organisation        sql.NullString
	Repo                sql.NullString
	Path                sql.NullString
	Vendor              sql.NullString
	Product             sql.NullString
	ProductVersion      sql.NullString
	Owner               sql.NullString
	OwnerNotes          sql.NullString
	ComponentType       sql.NullString
	ComponentUsage      sql.NullString
	Description         sql.NullString
	AdditionalMetadata  sql.NullString
}

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 DependencyHealth

type DependencyHealth struct {
	PackageName                        string
	PackageType                        string
	ScorecardScore                     sql.NullFloat64
	ScorecardCodereview                sql.NullInt64
	ScorecardMaintained                sql.NullInt64
	ScorecardCiibestpractices          sql.NullInt64
	ScorecardLicense                   sql.NullInt64
	ScorecardDangerousworkflow         sql.NullInt64
	ScorecardPackaging                 sql.NullInt64
	ScorecardTokenpermissions          sql.NullInt64
	ScorecardSignedreleases            sql.NullInt64
	ScorecardBranchprotection          sql.NullInt64
	ScorecardBinaryartifacts           sql.NullInt64
	ScorecardFuzzing                   sql.NullInt64
	ScorecardSecuritypolicy            sql.NullInt64
	ScorecardSast                      sql.NullInt64
	ScorecardVulnerabilities           sql.NullInt64
	ScorecardPinneddependencies        sql.NullInt64
	EcosystemsRepoArchived             sql.NullBool
	EcosystemsRepoPushedAt             sql.NullString
	EcosystemsRepoUpdatedAt            sql.NullString
	EcosystemsRepoLastSyncedAt         sql.NullString
	EcosystemsLastSyncedAt             sql.NullString
	EcosystemsLatestReleasePublishedAt sql.NullString
	EcosystemsStatus                   sql.NullString
	EcosystemsFunding                  sql.NullString
}

type InsertRowParams

type InsertRowParams struct {
	PackageName                        string
	PackageType                        string
	ScorecardScore                     sql.NullFloat64
	ScorecardCodereview                sql.NullInt64
	ScorecardMaintained                sql.NullInt64
	ScorecardCiibestpractices          sql.NullInt64
	ScorecardLicense                   sql.NullInt64
	ScorecardDangerousworkflow         sql.NullInt64
	ScorecardPackaging                 sql.NullInt64
	ScorecardTokenpermissions          sql.NullInt64
	ScorecardSignedreleases            sql.NullInt64
	ScorecardBranchprotection          sql.NullInt64
	ScorecardBinaryartifacts           sql.NullInt64
	ScorecardFuzzing                   sql.NullInt64
	ScorecardSecuritypolicy            sql.NullInt64
	ScorecardSast                      sql.NullInt64
	ScorecardVulnerabilities           sql.NullInt64
	ScorecardPinneddependencies        sql.NullInt64
	EcosystemsRepoArchived             sql.NullBool
	EcosystemsRepoPushedAt             sql.NullString
	EcosystemsRepoUpdatedAt            sql.NullString
	EcosystemsRepoLastSyncedAt         sql.NullString
	EcosystemsLastSyncedAt             sql.NullString
	EcosystemsLatestReleasePublishedAt sql.NullString
	EcosystemsStatus                   sql.NullString
	EcosystemsFunding                  sql.NullString
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) InsertRow

func (q *Queries) InsertRow(ctx context.Context, arg InsertRowParams) error

func (*Queries) RetrieveDistinctPackagesWithoutSensitivePackages

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

func (*Queries) RetrieveUnmaintainedPackages

func (q *Queries) RetrieveUnmaintainedPackages(ctx context.Context) ([]RetrieveUnmaintainedPackagesRow, error)

func (*Queries) WithTx

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

type Renovate

type Renovate struct {
	Platform        string
	Organisation    string
	Repo            string
	PackageName     string
	Version         string
	CurrentVersion  sql.NullString
	Digest          sql.NullString
	PackageManager  string
	PackageFilePath string
	Datasource      string
	DepTypes        string
	PackageType     string
	PackageUrl      string
}

type RenovateUpdate

type RenovateUpdate struct {
	Platform        string
	Organisation    string
	Repo            string
	PackageName     string
	Version         string
	CurrentVersion  sql.NullString
	Digest          sql.NullString
	PackageManager  string
	PackageFilePath string
	Datasource      string
	NewVersion      string
	NewDigest       sql.NullString
	UpdateType      string
}

type RetrieveDistinctPackagesWithoutSensitivePackagesRow

type RetrieveDistinctPackagesWithoutSensitivePackagesRow struct {
	PackageName string
	PackageType string
	Datasource  string
}

type RetrieveUnmaintainedPackagesRow

type RetrieveUnmaintainedPackagesRow struct {
	Platform                   sql.NullString
	Organisation               sql.NullString
	Repo                       sql.NullString
	PackageName                string
	Version                    sql.NullString
	CurrentVersion             sql.NullString
	PackageManager             string
	DepTypes                   string
	PackageFilePath            string
	ScorecardMaintained        sql.NullInt64
	EcosystemsRepoArchived     sql.NullBool
	EcosystemsStatus           sql.NullString
	EcosystemsLastSyncedAt     sql.NullString
	EcosystemsRepoLastSyncedAt sql.NullString
}

type Sbom

type Sbom struct {
	ComponentName  string
	PackageName    string
	Version        sql.NullString
	CurrentVersion sql.NullString
	PackageType    string
	PackageUrl     string
}

type SensitivePackage

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