Documentation ¶
Index ¶
Constants ¶
const ( VulnerabilityTableName = "vulnerability" GetVulnerabilityIndexName = "get_vulnerability_index" )
const ( VulnerabilityMatchExclusionTableName = "vulnerability_match_exclusion" GetVulnerabilityMatchExclusionIndexName = "get_vulnerability_match_exclusion_index" )
const (
IDTableName = "id"
)
const (
VulnerabilityMetadataTableName = "vulnerability_metadata"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IDModel ¶
type IDModel struct { BuildTimestamp string `gorm:"column:build_timestamp"` SchemaVersion int `gorm:"column:schema_version"` }
func NewIDModel ¶
type VulnerabilityMatchExclusionModel ¶
type VulnerabilityMatchExclusionModel struct { PK uint64 `gorm:"primary_key;auto_increment;"` ID string `gorm:"column:id; index:get_vulnerability_match_exclusion_index"` Constraints sqlite.NullString `gorm:"column:constraints; default:null"` Justification string `gorm:"column:justification"` }
VulnerabilityMatchExclusionModel is a struct used to serialize db.VulnerabilityMatchExclusion information into a sqlite3 DB.
func NewVulnerabilityMatchExclusionModel ¶
func NewVulnerabilityMatchExclusionModel(v v4.VulnerabilityMatchExclusion) VulnerabilityMatchExclusionModel
NewVulnerabilityMatchExclusionModel generates a new model from a db.VulnerabilityMatchExclusion struct.
func (*VulnerabilityMatchExclusionModel) Inflate ¶
func (m *VulnerabilityMatchExclusionModel) Inflate() (*v4.VulnerabilityMatchExclusion, error)
Inflate generates a db.VulnerabilityMatchExclusion object from the serialized model instance.
func (VulnerabilityMatchExclusionModel) TableName ¶
func (VulnerabilityMatchExclusionModel) TableName() string
TableName returns the table which all db.VulnerabilityMatchExclusion model instances are stored into.
type VulnerabilityMetadataModel ¶
type VulnerabilityMetadataModel struct { ID string `gorm:"primary_key; column:id;"` Namespace string `gorm:"primary_key; column:namespace;"` DataSource string `gorm:"column:data_source"` RecordSource string `gorm:"column:record_source"` Severity string `gorm:"column:severity"` URLs sqlite.NullString `gorm:"column:urls; default:null"` Description string `gorm:"column:description"` Cvss sqlite.NullString `gorm:"column:cvss; default:null"` }
VulnerabilityMetadataModel is a struct used to serialize db.VulnerabilityMetadata information into a sqlite3 DB.
func NewVulnerabilityMetadataModel ¶
func NewVulnerabilityMetadataModel(metadata v4.VulnerabilityMetadata) VulnerabilityMetadataModel
NewVulnerabilityMetadataModel generates a new model from a db.VulnerabilityMetadata struct.
func (*VulnerabilityMetadataModel) Inflate ¶
func (m *VulnerabilityMetadataModel) Inflate() (v4.VulnerabilityMetadata, error)
Inflate generates a db.VulnerabilityMetadataModel object from the serialized model instance.
func (VulnerabilityMetadataModel) TableName ¶
func (VulnerabilityMetadataModel) TableName() string
TableName returns the table which all db.VulnerabilityMetadata model instances are stored into.
type VulnerabilityModel ¶
type VulnerabilityModel struct { PK uint64 `gorm:"primary_key;auto_increment;"` ID string `gorm:"column:id"` PackageName string `gorm:"column:package_name; index:get_vulnerability_index"` Namespace string `gorm:"column:namespace; index:get_vulnerability_index"` VersionConstraint string `gorm:"column:version_constraint"` VersionFormat string `gorm:"column:version_format"` CPEs sqlite.NullString `gorm:"column:cpes; default:null"` RelatedVulnerabilities sqlite.NullString `gorm:"column:related_vulnerabilities; default:null"` FixedInVersions sqlite.NullString `gorm:"column:fixed_in_versions; default:null"` FixState string `gorm:"column:fix_state"` Advisories sqlite.NullString `gorm:"column:advisories; default:null"` }
VulnerabilityModel is a struct used to serialize db.Vulnerability information into a sqlite3 DB.
func NewVulnerabilityModel ¶
func NewVulnerabilityModel(vulnerability v4.Vulnerability) VulnerabilityModel
NewVulnerabilityModel generates a new model from a db.Vulnerability struct.
func (*VulnerabilityModel) Inflate ¶
func (m *VulnerabilityModel) Inflate() (v4.Vulnerability, error)
Inflate generates a db.Vulnerability object from the serialized model instance.
func (VulnerabilityModel) TableName ¶
func (VulnerabilityModel) TableName() string
TableName returns the table which all db.Vulnerability model instances are stored into.