Documentation ¶
Index ¶
- func CacheAffectedNamespacedFeatures(tx *sql.Tx, features []database.NamespacedFeature) error
- func CacheVulnerabiltyAffectedNamespacedFeature(tx *sql.Tx, affected map[int64]affectedFeatureRows) error
- func DeleteVulnerabilities(tx *sql.Tx, vulnerabilities []database.VulnerabilityID) error
- func FindAffectedNamespacedFeatures(tx *sql.Tx, features []database.NamespacedFeature) ([]database.NullableAffectedNamespacedFeature, error)
- func FindLatestDeletedVulnerabilityIDs(tx *sql.Tx, vulnIDs []database.VulnerabilityID) ([]sql.NullInt64, error)
- func FindNotDeletedVulnerabilityIDs(tx *sql.Tx, vulnIDs []database.VulnerabilityID) ([]sql.NullInt64, error)
- func FindPagedVulnerableAncestries(tx *sql.Tx, vulnID int64, limit int, currentToken pagination.Token, ...) (database.PagedVulnerableAncestries, error)
- func FindVulnerabilities(tx *sql.Tx, vulnerabilities []database.VulnerabilityID) ([]database.NullableVulnerability, error)
- func FindVulnerabilityIDs(tx *sql.Tx, vulnIDs []database.VulnerabilityID, withLatestDeleted bool) ([]sql.NullInt64, error)
- func InsertVulnerabilities(tx *sql.Tx, vulnerabilities []database.VulnerabilityWithAffected) error
- func InsertVulnerabilityAffected(tx *sql.Tx, vulnerabilityIDs []int64, ...) (map[int64]affectedFeatureRows, error)
- func InvalidateVulnerabilityCache(tx *sql.Tx, vulnerabilityIDs []int64) error
- func LockFeatureVulnerabilityCache(tx *sql.Tx) error
- func MarkVulnerabilitiesAsDeleted(tx *sql.Tx, vulnerabilities []database.VulnerabilityID) ([]int64, error)
- func SearchAffectingVulnerabilities(tx *sql.Tx, features []database.NamespacedFeature) ([]vulnerabilityCache, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheAffectedNamespacedFeatures ¶
func CacheAffectedNamespacedFeatures(tx *sql.Tx, features []database.NamespacedFeature) error
func CacheVulnerabiltyAffectedNamespacedFeature ¶
func CacheVulnerabiltyAffectedNamespacedFeature(tx *sql.Tx, affected map[int64]affectedFeatureRows) error
cacheVulnerabiltyAffectedNamespacedFeature takes in a map of vulnerability ID to affected feature rows and caches them.
func DeleteVulnerabilities ¶
func DeleteVulnerabilities(tx *sql.Tx, vulnerabilities []database.VulnerabilityID) error
func FindAffectedNamespacedFeatures ¶
func FindAffectedNamespacedFeatures(tx *sql.Tx, features []database.NamespacedFeature) ([]database.NullableAffectedNamespacedFeature, error)
FindAffectedNamespacedFeatures retrieves vulnerabilities associated with the feature.
func FindLatestDeletedVulnerabilityIDs ¶
func FindLatestDeletedVulnerabilityIDs(tx *sql.Tx, vulnIDs []database.VulnerabilityID) ([]sql.NullInt64, error)
findLatestDeletedVulnerabilityIDs requires all elements in vulnIDs are in database and the order of output array is not guaranteed.
func FindPagedVulnerableAncestries ¶
func FindPagedVulnerableAncestries(tx *sql.Tx, vulnID int64, limit int, currentToken pagination.Token, key pagination.Key) (database.PagedVulnerableAncestries, error)
func FindVulnerabilities ¶
func FindVulnerabilities(tx *sql.Tx, vulnerabilities []database.VulnerabilityID) ([]database.NullableVulnerability, error)
func FindVulnerabilityIDs ¶
func InsertVulnerabilities ¶
func InsertVulnerabilities(tx *sql.Tx, vulnerabilities []database.VulnerabilityWithAffected) error
func InsertVulnerabilityAffected ¶
func InsertVulnerabilityAffected(tx *sql.Tx, vulnerabilityIDs []int64, vulnerabilities []database.VulnerabilityWithAffected) (map[int64]affectedFeatureRows, error)
insertVulnerabilityAffected inserts a set of vulnerability affected features for each vulnerability provided.
i_th vulnerabilityIDs corresponds to i_th vulnerabilities provided.
func SearchAffectingVulnerabilities ¶
func SearchAffectingVulnerabilities(tx *sql.Tx, features []database.NamespacedFeature) ([]vulnerabilityCache, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.