db

package
v0.75.2 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: Apache-2.0 Imports: 5 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 DepsdevCfe added in v0.57.0

type DepsdevCfe struct {
	PackageName string
	Version     string
	CveID       string
	UpdatedAt   string
}

type DepsdevLicense added in v0.57.0

type DepsdevLicense struct {
	PackageName string
	Version     string
	License     string
	UpdatedAt   string
}

type ExternalLicense added in v0.59.0

type ExternalLicense struct {
	PackageName    string
	Version        string
	PackageManager string
	License        string
}

type InsertPolicyViolationParams

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

type Owner

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

type PolicyViolation

type PolicyViolation 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
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) InsertPolicyViolation

func (q *Queries) InsertPolicyViolation(ctx context.Context, arg InsertPolicyViolationParams) error

func (*Queries) RetrieveDistinctReposAndPackages

func (q *Queries) RetrieveDistinctReposAndPackages(ctx context.Context) ([]RetrieveDistinctReposAndPackagesRow, error)

func (*Queries) RetrievePolicyViolations

func (q *Queries) RetrievePolicyViolations(ctx context.Context) ([]RetrievePolicyViolationsRow, error)

func (*Queries) RetrieveRepositoryMetadata added in v0.67.0

func (q *Queries) RetrieveRepositoryMetadata(ctx context.Context) ([]RepositoryMetadatum, 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
	PackageManager  string
	PackageFilePath string
	Datasource      string
	DepTypes        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 RetrieveDistinctReposAndPackagesRow

type RetrieveDistinctReposAndPackagesRow struct {
	Platform        string
	Organisation    string
	Repo            string
	PackageName     string
	Version         string
	CurrentVersion  sql.NullString
	PackageManager  string
	DepTypes        string
	PackageFilePath string
	Licenses        string
}

func (RetrieveDistinctReposAndPackagesRow) DepTypesAsString

func (row RetrieveDistinctReposAndPackagesRow) DepTypesAsString() string

type RetrievePolicyViolationsLikeParams

type RetrievePolicyViolationsLikeParams struct {
	Platform     string
	Org          string
	Repo         string
	Owner        interface{}
	Level        string
	AdvisoryType string
}

func NewRetrievePolicyViolationsLikeParams

func NewRetrievePolicyViolationsLikeParams(platform string, org string, repo string, owner string, level string, advisoryType string) RetrievePolicyViolationsLikeParams

type RetrievePolicyViolationsLikeRow

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

type RetrievePolicyViolationsRow

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

type Sbom

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

Jump to

Keyboard shortcuts

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