# Functions
AbstractPackagesToPackages converts several AbstractPackages to Packages.
Close closes a Cayley database.
CountNotificationsToSend returns the number of pending notifications Note that it also count the locked notifications.
DeleteVulnerability deletes the vulnerability having the given ID.
FindAllLayersByAddedPackageNodes finds and returns all layers that add the given packages (by their nodes), selecting the specified fields.
FindAllLayersIntroducingVulnerability finds and returns the list of layers that introduce the given vulnerability (by its ID), selecting the specified fields.
FindAllPackagesByBranch finds and returns all packages that belong to the given Branch, selecting the specified fields.
FindAllPackagesByNodes finds and returns all packages given by their nodes, selecting the specified fields.
FindAllVulnerabilitiesByFixedIn finds and returns all vulnerabilities that are fixed in the given packages (speficied by their nodes), selecting the specified fields.
FindOneLayerByID finds and returns a single layer having the given ID, selecting the specified fields and hardcoding its ID.
FindOneLayerByNode finds and returns a single package by its node, selecting the specified fields.
FindOneNotificationToSend finds and returns a notification that is not sent yet and not locked.
FindOnePackage finds and returns a single package having the given OS, name and version, selecting the specified fields.
FindOneVulnerability finds and returns a single vulnerability having the given ID selecting the specified fields.
GetDefaultNotificationWrapper returns the default wrapper.
GetFlagValue returns the value of the flag given by its name (or an empty string if the flag does not exist).
Healthcheck simply adds and then remove a quad in Cayley to ensure it is working It returns true when everything is ok.
InsertLayer insert a single layer in the database
ID, and EngineVersion fields are required.
InsertNotifications stores multiple Notification in the database It uses the given NotificationWrapper to convert these notifications to something that can be stored in the database.
InsertPackages inserts several packages in the database in one transaction Packages are stored in linked lists, one per Branch.
InsertVulnerabilities inserts or updates several vulnerabilities in the database in one transaction It ensures that a vulnerability can't be fixed by two packages belonging the same Branch.
Lock tries to set a temporary lock in the database.
LockInfo returns the owner of a lock specified by its name and its expiration time.
MarkNotificationAsSent marks a notification as sent.
Open opens a Cayley database, creating it if necessary and return its handle.
PackagesToAbstractPackages converts several Packages to AbstractPackages.
Unlock unlocks a lock specified by its name if I own it.
UpdateFlag creates a flag or update an existing flag's value.
# Constants
FieldIs is the graph predicate defining the type of an entity.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
DebianReleasesMapping translates Debian code names and class names to version numbers TODO That should probably be stored in the database or in a file.
ErrBackendException is an error that occurs when the database backend does not work properly (ie.
ErrCantOpen is an error that occurs when the database could not be opened.
ErrInconsistent is an error that occurs when a database consistency check fails (ie.
ErrTransaction is an error that occurs when a database transaction fails.
No description provided by the author
No description provided by the author
No description provided by the author
UbuntuReleasesMapping translates Ubuntu code names to version numbers TODO That should probably be stored in the database or in a file.
# Structs
AbstractPackage is a package that abstract types.MaxVersion by modifying using a AllVersion boolean field and renaming Version to BeforeVersion which makes more sense for an usage with a Vulnerability.
AbstractVulnerability represents a Vulnerability as it is defined in the database package but exposes directly a list of AbstractPackage instead of nodes to packages.
DefaultWrapper is an implementation of NotificationWrapper that supports NewVulnerabilityNotification notifications.
Layer represents an unique container layer.
A NewVulnerabilityNotification is a notification that informs about a new vulnerability and contains all the layers that introduce that vulnerability.
A NotificationWrap wraps a Notification into something that can be stored in the database.
Package represents a package.
Vulnerability represents a vulnerability that is fixed in some Packages.
A VulnerabilityPackageChangedNotification is a notification that informs that an existing vulnerability's fixed package list has been updated and may not affect some layers anymore or may affect new layers.
A VulnerabilityPriorityIncreasedNotification is a notification that informs about the fact that the priority of a vulnerability increased vulnerability and contains all the layers that introduce that vulnerability.
# Interfaces
A Notification defines an interface to a message that can be sent by a notifier.Notifier.
NotificationWrapper is an interface defined how to convert a Notification to a NotificationWrap object and vice-versa.
# Type aliases
ByVersion implements sort.Interface for []*Package based on the Version field It uses github.com/quentin-m/dpkgcomp internally and makes use of types.MinVersion/types.MaxVersion.