updated proto files to conform with autogenpb
This commit is contained in:
parent
54f4c4be3d
commit
d8a2e56b88
2
Makefile
2
Makefile
|
@ -5,7 +5,7 @@
|
|||
# go install
|
||||
|
||||
|
||||
all: package.pb.go machine.pb.go vet
|
||||
all: package.pb.go machine.pb.go goimports vet
|
||||
|
||||
vet:
|
||||
@GO111MODULE=off go vet
|
||||
|
|
11
apt.go
11
apt.go
|
@ -24,17 +24,14 @@ func (me *Machine) initPackages() {
|
|||
new1 := new(Package)
|
||||
new1.Name = pkg
|
||||
new1.Version = version
|
||||
if me.Packages.Append(new1) {
|
||||
// log.Info("added", new1.Name, "ok")
|
||||
} else {
|
||||
log.Info("added", new1.Name, "failed")
|
||||
}
|
||||
me.Packages.Append(new1)
|
||||
log.Info("added", new1.Name, "failed")
|
||||
}
|
||||
}
|
||||
|
||||
func (me *Machine) addNew(name string, version string) bool {
|
||||
func (me *Machine) addNew(name string, version string) {
|
||||
new1 := new(Package)
|
||||
new1.Name = name
|
||||
new1.Version = version
|
||||
return me.Packages.Append(new1)
|
||||
me.Packages.Append(new1)
|
||||
}
|
||||
|
|
|
@ -75,6 +75,7 @@ func (me *Machine) UpdatePackages() string {
|
|||
log.Info("fixme. broken after move to autogenpb")
|
||||
return ""
|
||||
}
|
||||
|
||||
/*
|
||||
func (me *Machine) UpdatePackages() string {
|
||||
// Get the list of installed packages for the detected distro
|
||||
|
|
|
@ -7,20 +7,20 @@ import "google/protobuf/timestamp.proto"; // Import the well-known type for Time
|
|||
|
||||
// global settings for autogenpb `autogenpb:mutex`
|
||||
|
||||
message Machine { // `autogenpb:marshal`
|
||||
string hostname = 1; // `autogenpb:unique`
|
||||
int64 memory = 2;
|
||||
int64 cpus = 3;
|
||||
string distro = 4;
|
||||
Packages packages = 5;
|
||||
google.protobuf.Timestamp laststamp = 6; // the last time we heard anything from this machine
|
||||
Packages installed = 7; // packages that are installed
|
||||
Packages available = 8; // packages that are available
|
||||
Packages wit = 9; // packages that are available from mirrors.wit.com
|
||||
message Machine { // `autogenpb:marshal`
|
||||
string hostname = 1; // `autogenpb:unique`
|
||||
int64 memory = 2;
|
||||
int64 cpus = 3;
|
||||
string distro = 4;
|
||||
Packages packages = 5;
|
||||
google.protobuf.Timestamp laststamp = 6; // the last time we heard anything from this machine
|
||||
Packages installed = 7; // packages that are installed
|
||||
Packages available = 8; // packages that are available
|
||||
Packages wit = 9; // packages that are available from mirrors.wit.com
|
||||
}
|
||||
|
||||
message Machines { // `autogenpb:marshal`
|
||||
string uuid = 1; // I guess why not just have this on each file
|
||||
string version = 2; // maybe can be used for protobuf schema change violations
|
||||
repeated Machine machines = 3;
|
||||
message Machines { // `autogenpb:marshal`
|
||||
string uuid = 1; // `autogenpb:uuid:b57e7fac-a8fc-4949-9d50-fa38312dec87`
|
||||
string version = 2; // `autogenpb:version:v0.0.1`
|
||||
repeated Machine machines = 3;
|
||||
}
|
||||
|
|
|
@ -8,16 +8,16 @@ import "google/protobuf/timestamp.proto"; // Import the well-known type for Time
|
|||
// global settings for autogenpb `autogenpb:mutex`
|
||||
|
||||
message Package {
|
||||
string name = 1; // `autogenpb:unique` // name: zookeeper-go
|
||||
string version = 2; // version: 0.0.3
|
||||
google.protobuf.Timestamp laststamp = 3; // the last time this package was seen (used to timeout entries)
|
||||
string srcPath = 4; // path to the sources (go.wit.com/apps/zookeeper)
|
||||
bool installed = 5; // if installed on your machine, this should be set to true
|
||||
string pkgName = 6; // the apt filename pool/main/f/foo/foo_2.2.2_riscv64.deb
|
||||
string name = 1; // `autogenpb:unique` `autogenpb:sort`
|
||||
string version = 2; // version: 0.0.3
|
||||
google.protobuf.Timestamp laststamp = 3; // the last time this package was seen (used to timeout entries)
|
||||
string srcPath = 4; // path to the sources (go.wit.com/apps/zookeeper)
|
||||
bool installed = 5; // if installed on your machine, this should be set to true
|
||||
string pkgName = 6; // the apt filename pool/main/f/foo/foo_2.2.2_riscv64.deb
|
||||
}
|
||||
|
||||
message Packages { // `autogenpb:marshal`
|
||||
string uuid = 1; // I guess why not just have this on each file
|
||||
string version = 2; // maybe can be used for protobuf schema change violations
|
||||
repeated Package packages = 3;
|
||||
message Packages { // `autogenpb:marshal`
|
||||
string uuid = 1; // `autogenpb:uuid:2f26cc03-ea30-4481-a333-ad0acc86e1d3`
|
||||
string version = 2; // `autogenpb:version:v0.0.1`
|
||||
repeated Package packages = 3;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue