Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Mgr is the global sbom report manager Mgr = NewManager() )
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager interface { // Create a new report record. // // Arguments: // ctx context.Context : the context for this method // r *scan.Report : report model to be created // // Returns: // string : uuid of the new report // error : non nil error if any errors occurred // Create(ctx context.Context, r *model.Report) (string, error) // Delete delete report by uuid // // Arguments: // ctx context.Context : the context for this method // uuid string : uuid of the report to delete // // Returns: // error : non nil error if any errors occurred // Delete(ctx context.Context, uuid string) error // UpdateReportData update the report data (with JSON format) of the given report. // // Arguments: // ctx context.Context : the context for this method // uuid string : uuid to identify the report // report string : report JSON data // // Returns: // error : non nil error if any errors occurred // UpdateReportData(ctx context.Context, uuid string, report string) error // GetBy the reports for the given digest by other properties. // // Arguments: // ctx context.Context : the context for this method // artifact_id int64 : the artifact id // registrationUUID string : [optional] the report generated by which registration. // If it is empty, reports by all the registrations are retrieved. // mimeTypes []string : [optional] mime types of the reports requiring // If empty array is specified, reports with all the supported mimes are retrieved. // // Returns: // []*Report : sbom report list // error : non nil error if any errors occurred GetBy(ctx context.Context, artifactID int64, registrationUUID string, mimeType string, mediaType string) ([]*model.Report, error) // List reports according to the query // // Arguments: // ctx context.Context : the context for this method // query *q.Query : the query to list the reports // // Returns: // []*scan.Report : report list // error : non nil error if any errors occurred List(ctx context.Context, query *q.Query) ([]*model.Report, error) // Update update report information Update(ctx context.Context, r *model.Report, cols ...string) error // DeleteByExtraAttr delete scan_report by sbom_digest DeleteByExtraAttr(ctx context.Context, mimeType, attrName, attrValue string) error // DeleteByArtifactID delete sbom report by artifact id DeleteByArtifactID(ctx context.Context, artifactID int64) error }
Manager is used to manage the sbom reports.
Click to show internal directories.
Click to hide internal directories.