db

package
v0.94.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advisory

type Advisory struct {
	Platform        string
	Organisation    string
	Repo            string
	PackageName     string
	Version         string
	CurrentVersion  sql.NullString
	PackageManager  string
	PackageFilePath string
	DepTypes        string
	Level           string
	AdvisoryType    string
	Description     string
	SupportedUntil  sql.NullString
	EolFrom         sql.NullString
}

type CountDependenciesForParams

type CountDependenciesForParams struct {
	Platform     string
	Organisation string
	Repo         string
}

type CountPackageAdvisoriesForRepoParams

type CountPackageAdvisoriesForRepoParams struct {
	Platform string
	Org      string
	Repo     string
}

type CountPolicyViolationsForRepoParams

type CountPolicyViolationsForRepoParams struct {
	Platform string
	Org      string
	Repo     string
}

type CustomAdvisory added in v0.71.0

type CustomAdvisory struct {
	PackagePattern       string
	PackageManager       string
	Version              sql.NullString
	VersionMatchStrategy sql.NullString
	Level                string
	AdvisoryType         string
	Description          string
}

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 added in v0.76.0

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 Libyear added in v0.82.0

type Libyear struct {
	PackageName              string
	Version                  string
	CurrentVersion           sql.NullString
	PackageManager           string
	Libyear                  float64
	VersionReleaseDate       string
	LatestVersion            string
	LatestVersionReleaseDate string
	LastSyncedAt             string
}

type ListReposLikeParams

type ListReposLikeParams struct {
	Platform     string
	Organisation string
	Repo         string
}

type ListReposLikeRow

type ListReposLikeRow struct {
	Platform     string
	Organisation string
	Repo         string
}

type Owner

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) CountDependenciesFor

func (q *Queries) CountDependenciesFor(ctx context.Context, arg CountDependenciesForParams) ([]int64, error)

func (*Queries) CountPackageAdvisoriesForRepo

func (q *Queries) CountPackageAdvisoriesForRepo(ctx context.Context, arg CountPackageAdvisoriesForRepoParams) ([]int64, error)

func (*Queries) CountPolicyViolationsForRepo

func (q *Queries) CountPolicyViolationsForRepo(ctx context.Context, arg CountPolicyViolationsForRepoParams) ([]int64, error)

func (*Queries) ListReposLike

func (q *Queries) ListReposLike(ctx context.Context, arg ListReposLikeParams) ([]ListReposLikeRow, error)

func (*Queries) RetrieveDependenciesFor

func (q *Queries) RetrieveDependenciesFor(ctx context.Context, arg RetrieveDependenciesForParams) ([]RetrieveDependenciesForRow, error)

func (*Queries) RetrieveDependencyHealthFor added in v0.76.0

func (q *Queries) RetrieveDependencyHealthFor(ctx context.Context, arg RetrieveDependencyHealthForParams) (DependencyHealth, error)

func (*Queries) RetrieveLibyearsForRepo added in v0.82.0

func (q *Queries) RetrieveLibyearsForRepo(ctx context.Context, arg RetrieveLibyearsForRepoParams) (sql.NullFloat64, error)

func (*Queries) RetrieveOwner

func (q *Queries) RetrieveOwner(ctx context.Context, arg RetrieveOwnerParams) (RetrieveOwnerRow, error)

func (*Queries) RetrieveRepositoryMetadata added in v0.67.0

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
	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
	PackageManager  string
	PackageFilePath string
	Datasource      string
	NewVersion      string
	UpdateType      string
}

type RepositoryMetadatum added in v0.67.0

type RepositoryMetadatum struct {
	Platform           string
	Organisation       string
	Repo               string
	IsMonorepo         bool
	IsFork             bool
	RepositoryType     string
	RepositoryUsage    sql.NullString
	Visibility         string
	Description        sql.NullString
	AdditionalMetadata sql.NullString
}

type RetrieveDependenciesForParams

type RetrieveDependenciesForParams struct {
	Platform     string
	Organisation string
	Repo         string
}

type RetrieveDependenciesForRow

type RetrieveDependenciesForRow struct {
	PackageName     string
	Version         string
	CurrentVersion  sql.NullString
	PackageManager  string
	DepTypes        string
	PackageFilePath string
}

type RetrieveDependencyHealthForParams added in v0.76.0

type RetrieveDependencyHealthForParams struct {
	PackageName    string
	PackageManager string
}

type RetrieveLibyearsForRepoParams added in v0.82.0

type RetrieveLibyearsForRepoParams struct {
	Platform string
	Org      string
	Repo     string
}

type RetrieveOwnerParams

type RetrieveOwnerParams struct {
	Platform     string
	Organisation string
	Repo         string
}

type RetrieveOwnerRow added in v0.66.0

type RetrieveOwnerRow struct {
	Owner string
	Notes sql.NullString
}

type RetrievePackageAdvisoriesForRepoParams

type RetrievePackageAdvisoriesForRepoParams struct {
	Platform string
	Org      string
	Repo     string
}

type RetrievePackageAdvisoriesForRepoRow

type RetrievePackageAdvisoriesForRepoRow struct {
	PackageName     string
	Version         string
	CurrentVersion  sql.NullString
	PackageManager  string
	DepTypes        string
	PackageFilePath string
	AdvisoryType    string
	Description     string
	SupportedUntil  sql.NullString
	EolFrom         sql.NullString
}

type RetrievePolicyViolationsForRepoParams

type RetrievePolicyViolationsForRepoParams struct {
	Platform string
	Org      string
	Repo     string
}

type RetrievePolicyViolationsForRepoRow

type RetrievePolicyViolationsForRepoRow struct {
	PackageName     string
	Version         string
	CurrentVersion  sql.NullString
	PackageManager  string
	DepTypes        string
	PackageFilePath string
	Level           string
	AdvisoryType    string
	Description     string
}

type RetrieveRepositoryMetadataParams added in v0.67.0

type RetrieveRepositoryMetadataParams struct {
	Platform string
	Org      string
	Repo     string
}

type RetrieveRepositoryMetadataRow added in v0.67.0

type RetrieveRepositoryMetadataRow struct {
	IsMonorepo         bool
	IsFork             bool
	RepositoryType     string
	RepositoryUsage    sql.NullString
	Visibility         string
	Description        sql.NullString
	AdditionalMetadata sql.NullString
}

type Sbom

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

Jump to

Keyboard shortcuts

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