2023-10-22 17:46:46 +02:00
|
|
|
package common
|
|
|
|
|
2023-10-26 14:56:36 +02:00
|
|
|
import (
|
|
|
|
"github.com/google/uuid"
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
2023-10-26 13:59:10 +02:00
|
|
|
// OSInfo gives some basic information about the system.
|
2023-10-22 17:46:46 +02:00
|
|
|
type OSInfo struct {
|
|
|
|
OS string
|
|
|
|
Distribution string
|
|
|
|
DistributionLike []string
|
|
|
|
Version string
|
|
|
|
KernelRelease string
|
|
|
|
Architecture string
|
|
|
|
PackageManager string
|
|
|
|
}
|
|
|
|
|
2023-10-26 13:59:10 +02:00
|
|
|
// ListPackage is a single package and the information about it
|
2023-10-22 17:46:46 +02:00
|
|
|
type ListPackage struct {
|
|
|
|
Name string
|
|
|
|
Source string
|
|
|
|
Version string
|
|
|
|
Upgradeable bool
|
|
|
|
UpgradeableTo string
|
|
|
|
Architecture string
|
|
|
|
PackageManager string
|
|
|
|
}
|
2023-10-26 13:54:29 +02:00
|
|
|
|
2023-10-26 13:59:10 +02:00
|
|
|
// PackageList holds a list of ListPackages and some additional metadata
|
2023-10-26 13:54:29 +02:00
|
|
|
type PackageList struct {
|
2023-10-26 14:56:36 +02:00
|
|
|
HostID uuid.UUID
|
|
|
|
Time *time.Time
|
|
|
|
List []ListPackage
|
2023-10-26 13:54:29 +02:00
|
|
|
}
|