postgresmodels

package
v0.0.177 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2023 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 BaseModel

type BaseModel struct {
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt gorm.DeletedAt `gorm:"index"`
}

type JSONB

type JSONB map[string]interface{}

JSONB Interface for JSONB Field

func (*JSONB) Scan

func (p *JSONB) Scan(src interface{}) error

JSONB Scan Unmarshal

func (JSONB) Value

func (p JSONB) Value() (driver.Value, error)

JSONB Value Marshal

type Vulnerability

type Vulnerability struct {
	BaseModel
	Name          string `gorm:"primaryKey"`
	Severity      string
	SeverityScore int
	IsRCE         bool
	Links         pq.StringArray `gorm:"type:text[]"`
	Description   string
}

type VulnerabilityFinding

type VulnerabilityFinding struct {
	BaseModel
	VulnerabilityName string        `gorm:"primaryKey"`
	Vulnerability     Vulnerability `gorm:"foreignKey:VulnerabilityName"`
	ImageScanId       string        `gorm:"primaryKey"`
	Component         string        `gorm:"primaryKey"`
	ComponentVersion  string        `gorm:"primaryKey"`
	LayerHash         string        `gorm:"primaryKey"`
	FixAvailable      *bool
	FixedInVersion    string
	LayerIndex        *int
	LayerCommand      string
}

type VulnerabilityScanSummary

type VulnerabilityScanSummary struct {
	BaseModel
	ScanKind        string
	ImageScanId     string `gorm:"primaryKey"`
	Timestamp       time.Time
	CustomerGuid    string
	Wlid            string
	Designators     JSONB
	ImageRegistry   string
	ImageRepository string
	ImageTag        string
	ImageHash       string
	JobIds          pq.StringArray `gorm:"type:text[]"`
	Status          string
	Errors          pq.StringArray         `gorm:"type:text[]"`
	Findings        []VulnerabilityFinding `gorm:"foreignKey:ImageScanId"`
	IsStub          *bool                  // if true, this is a stub scan summary, and the actual scan summary is not yet available. Should be deleted once we have the real one.
}

Jump to

Keyboard shortcuts

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