model

package
v0.0.0-...-a548ab7 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// SBOMRepository ...
	SBOMRepository = "sbom_repository"
	// SBOMDigest ...
	SBOMDigest = "sbom_digest"
	// StartTime ...
	StartTime = "start_time"
	// EndTime ...
	EndTime = "end_time"
	// Duration ...
	Duration = "duration"
	// ScanStatus ...
	ScanStatus = "scan_status"
	// ReportID ...
	ReportID = "report_id"
	// Scanner ...
	Scanner = "scanner"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type RawSBOMReport

type RawSBOMReport struct {
	// Time of generating this report
	GeneratedAt string `json:"generated_at"`
	// Scanner of generating this report
	Scanner *v1.Scanner `json:"scanner"`
	// MediaType the media type of the report, e.g. application/spdx+json
	MediaType string `json:"media_type"`
	// SBOM sbom content
	SBOM map[string]interface{} `json:"sbom,omitempty"`
}

RawSBOMReport the original report of the sbom report get from scanner

type Report

type Report struct {
	ID               int64  `orm:"pk;auto;column(id)"`
	UUID             string `orm:"unique;column(uuid)"`
	ArtifactID       int64  `orm:"column(artifact_id)"`
	RegistrationUUID string `orm:"column(registration_uuid)"`
	MimeType         string `orm:"column(mime_type)"`
	MediaType        string `orm:"column(media_type)"`
	ReportSummary    string `orm:"column(report);type(json)"`
}

Report sbom report. Identified by the `artifact_id`, `registration_uuid` and `mime_type`.

func (*Report) TableName

func (r *Report) TableName() string

TableName for sbom report

type Summary

type Summary map[string]interface{}

Summary includes the sbom summary information

func (Summary) SBOMAccArt

func (s Summary) SBOMAccArt() (repo, digest string)

SBOMAccArt returns the repository and digest of the SBOM

Jump to

Keyboard shortcuts

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