db

package
v0.100.6 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CreateTablesQuery string

Functions

This section is empty.

Types

type ComponentMetadatum

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 InsertComponentParams

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

func NewInsertComponentParams

func NewInsertComponentParams(componentName string, repoKey domain.RepoKey) InsertComponentParams

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) ComponentExists

func (q *Queries) ComponentExists(ctx context.Context, componentName string) (string, error)

func (*Queries) InsertComponent

func (q *Queries) InsertComponent(ctx context.Context, arg InsertComponentParams) error

func (*Queries) UpdateRepoKey

func (q *Queries) UpdateRepoKey(ctx context.Context, arg UpdateRepoKeyParams) error

func (*Queries) UpdateVendorProductInfo

func (q *Queries) UpdateVendorProductInfo(ctx context.Context, arg UpdateVendorProductInfoParams) error

func (*Queries) WithTx

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

type UpdateRepoKeyParams

type UpdateRepoKeyParams struct {
	Platform      sql.NullString
	Organisation  sql.NullString
	Repo          sql.NullString
	ComponentName string
}

func NewUpdateRepoKeyParams

func NewUpdateRepoKeyParams(componentName string, repoKey domain.RepoKey) UpdateRepoKeyParams

type UpdateVendorProductInfoParams

type UpdateVendorProductInfoParams struct {
	Vendor         sql.NullString
	Product        sql.NullString
	ProductVersion sql.NullString
	ComponentName  string
}

Jump to

Keyboard shortcuts

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