dao

package
v0.0.0-...-a14a4d2 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DAO

type DAO interface {
	// Create creates new report
	Create(ctx context.Context, r *model.Report) (int64, error)
	// DeleteMany delete the reports according to the query
	DeleteMany(ctx context.Context, query q.Query) (int64, error)
	// List lists the reports with given query parameters.
	List(ctx context.Context, query *q.Query) ([]*model.Report, error)
	// UpdateReportData only updates the `report` column with conditions matched.
	UpdateReportData(ctx context.Context, uuid string, report string) error
	// Update update report
	Update(ctx context.Context, r *model.Report, cols ...string) error
	// DeleteByExtraAttr delete the scan_report by mimeType and extra attribute
	DeleteByExtraAttr(ctx context.Context, mimeType, attrName, attrValue string) error
}

DAO is the data access object interface for sbom report

func New

func New() DAO

New returns an instance of the default DAO

Jump to

Keyboard shortcuts

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