models

package
v0.0.0-...-acb99ff Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageDto

type ImageDto struct {
	Id        int            `gorm:"column:Id;primaryKey;<-:false"`
	Name      string         `gorm:"column:Name;->;<-:create"`
	BaseImage string         `gorm:"column:BaseImage;->;<-:create"`
	Scans     []ImageScanDto `gorm:"foreignKey:ImageId"`
}

func (ImageDto) TableName

func (ImageDto) TableName() string

type ImageScanDto

type ImageScanDto struct {
	Id                       int                                 `gorm:"column:Id;primaryKey;<-:false"`
	ImageId                  int                                 `gorm:"column:ImageId;<-:false"`
	ScanTime                 time.Time                           `gorm:"column:ScanTime;<-:false"`
	ScanSuccess              bool                                `gorm:"column:ScanSuccess;<-:false"`
	VulnerabilityAggregation []ImageScanVulnerabilityAggregation `gorm:"foreignKey:ImageScanId"`
	Vulnerabilities          []VulnerabilityDto                  `gorm:"many2many:ImageScanVulnerabilities;joinForeignKey:ImageScanId;joinReferences:VulnerabilityId"` // https://gorm.io/docs/many_to_many.html
}

func (ImageScanDto) TableName

func (ImageScanDto) TableName() string

type ImageScanVulnerabilityAggregation

type ImageScanVulnerabilityAggregation struct {
	ImageScanId int    `gorm:"column:ImageScanId;<-:false"`
	Severity    string `gorm:"column:Severity;<-:false"`
	Count       int    `gorm:"column:Count;<-:false"`
}

func (ImageScanVulnerabilityAggregation) TableName

type VulnerabilityDto

type VulnerabilityDto struct {
	Id               int                          `gorm:"column:Id;primaryKey;<-:false"`
	ExternalId       string                       `gorm:"column:ExternalId;<-:false"`
	PackageName      string                       `gorm:"column:PackageName;<-:false"`
	Version          string                       `gorm:"column:Version;<-:false"`
	Title            string                       `gorm:"column:Title;<-:false"`
	Description      string                       `gorm:"column:Description;<-:false"`
	Severity         string                       `gorm:"column:Severity;<-:false"`
	CVSS             *float32                     `gorm:"column:CVSS;<-:false"`
	CVSSv3           string                       `gorm:"column:CVSSv3;<-:false"`
	CreationTime     time.Time                    `gorm:"column:CreationTime;<-:false"`
	ModificationTime time.Time                    `gorm:"column:ModificationTime;<-:false"`
	PublicationTime  time.Time                    `gorm:"column:PublicationTime;<-:false"`
	DisclosureTime   time.Time                    `gorm:"column:DisclosureTime;<-:false"`
	References       []VulnerabilityReferenceDto  `gorm:"foreignKey:VulnerabilityId"`
	Identifiers      []VulnerabilityIdentifierDto `gorm:"foreignKey:VulnerabilityId"`
}

func (VulnerabilityDto) TableName

func (VulnerabilityDto) TableName() string

type VulnerabilityIdentifierDto

type VulnerabilityIdentifierDto struct {
	VulnerabilityId int    `gorm:"column:VulnerabilityId;primaryKey;<-:false"`
	IdentifierType  string `gorm:"column:IdentifierType;primaryKey;<-:false"`
	Identifier      string `gorm:"column:Identifier;primaryKey;<-:false"`
}

func (VulnerabilityIdentifierDto) TableName

func (VulnerabilityIdentifierDto) TableName() string

type VulnerabilityReferenceDto

type VulnerabilityReferenceDto struct {
	VulnerabilityId int    `gorm:"column:VulnerabilityId;primaryKey;<-:false"`
	Url             string `gorm:"column:Url;primaryKey;<-:false"`
}

func (VulnerabilityReferenceDto) TableName

func (VulnerabilityReferenceDto) TableName() string

Jump to

Keyboard shortcuts

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