mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 01:15:22 +00:00
e8669818eb
- Maintain software inventory with detail queries. - Associated database migrations. - Feature flagged off by default (see documentation for details to turn on). - Documentation. - New test helper for slice element comparisons skipping ID.
29 lines
973 B
Go
29 lines
973 B
Go
package kolide
|
|
|
|
type SoftwareStore interface {
|
|
SaveHostSoftware(host *Host) error
|
|
LoadHostSoftware(host *Host) error
|
|
}
|
|
|
|
// Software is a named and versioned piece of software installed on a device.
|
|
type Software struct {
|
|
ID uint `json:"id" db:"id"`
|
|
// Name is the reported name.
|
|
Name string `json:"name" db:"name"`
|
|
// Version is reported version.
|
|
Version string `json:"version" db:"version"`
|
|
// Source is the source of the data (osquery table name).
|
|
Source string `json:"source" db:"source"`
|
|
}
|
|
|
|
// HostSoftware is the set of software installed on a specific host
|
|
type HostSoftware struct {
|
|
// Software is the software information.
|
|
Software []Software `json:"software,omitempty"`
|
|
// Modified is a boolean indicating whether this has been modified since
|
|
// loading. If Modified is true, datastore implementations should save the
|
|
// data. We track this here because saving the software set is likely to be
|
|
// an expensive operation.
|
|
Modified bool `json:"-"`
|
|
}
|