added PackageList struct to common
parent
7ea813e74a
commit
f31aa197ca
|
@ -1,5 +1,6 @@
|
|||
package common
|
||||
|
||||
// OSInfo gives some basic information about the system.
|
||||
type OSInfo struct {
|
||||
OS string
|
||||
Distribution string
|
||||
|
@ -10,6 +11,7 @@ type OSInfo struct {
|
|||
PackageManager string
|
||||
}
|
||||
|
||||
// ListPackage is a single package and the information about it
|
||||
type ListPackage struct {
|
||||
Name string
|
||||
Source string
|
||||
|
@ -20,5 +22,9 @@ type ListPackage struct {
|
|||
PackageManager string
|
||||
}
|
||||
|
||||
// PackageList holds a list of ListPackages and some additional metadata
|
||||
type PackageList struct {
|
||||
Hostname string
|
||||
Date int64
|
||||
List []ListPackage
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package endpoint
|
||||
|
||||
import "github.com/gin-gonic/gin"
|
||||
import "git.jmbit.de/jmb/patchman/common"
|
||||
|
||||
func PackageList(c *gin.Context) {
|
||||
|
||||
var packageList common.PackageList
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ module git.jmbit.de/jmb/patchman/server
|
|||
go 1.21.3
|
||||
|
||||
require (
|
||||
git.jmbit.de/jmb/patchman/common v0.0.0-20231026115429-7ea813e74a3f
|
||||
github.com/gin-gonic/gin v1.9.1
|
||||
github.com/spf13/viper v1.17.0
|
||||
)
|
||||
|
|
|
@ -36,6 +36,8 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX
|
|||
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
|
||||
cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo=
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
git.jmbit.de/jmb/patchman/common v0.0.0-20231026115429-7ea813e74a3f h1:TBGCreejem+sBB5YfM9yTzyEiNUw8uQ3WG3S9WPot6M=
|
||||
git.jmbit.de/jmb/patchman/common v0.0.0-20231026115429-7ea813e74a3f/go.mod h1:kDNcep588pcLfJQ5E5iFxhceXkkBrlCOnwZylTBeVOA=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
|
||||
|
|
Loading…
Reference in New Issue