summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile5
-rw-r--r--package.proto55
-rw-r--r--tableDefault.go8
3 files changed, 43 insertions, 25 deletions
diff --git a/Makefile b/Makefile
index b0993b6..a045e82 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,11 @@
all: generate goimports vet
+proto-renumber: clean
+ autogenpb --renumber --proto package.proto
+ autogenpb --renumber --proto machine.proto
+ make goimports vet
+
generate: clean
go mod init
go mod tidy
diff --git a/package.proto b/package.proto
index 80a9cc7..9ba9055 100644
--- a/package.proto
+++ b/package.proto
@@ -8,30 +8,37 @@ 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` `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)
- google.protobuf.Timestamp ctime = 4; // the last time this package was seen (used to timeout entries)
- string srcPath = 5; // path to the sources (go.wit.com/apps/zookeeper)
- bool installed = 6; // if installed on your machine, this should be set to true
- string pkgName = 7; // the apt filename pool/main/f/foo/foo_2.2.2_riscv64.deb
- string Architecture = 8; // the apt filename pool/main/f/foo/foo_2.2.2_riscv64.deb
- string Source = 9; // the apt filename pool/main/f/foo/foo_2.2.2_riscv64.deb
- string Package = 10; // the apt filename pool/main/f/foo/foo_2.2.2_riscv64.deb
- string Size = 11; // the apt filename pool/main/f/foo/foo_2.2.2_riscv64.deb
- string Depends = 12; // the apt filename pool/main/f/foo/foo_2.2.2_riscv64.deb
- string Maintainer = 13; // the apt filename pool/main/f/foo/foo_2.2.2_riscv64.deb
- string Filename = 14; // the apt filename pool/main/f/foo/foo_2.2.2_riscv64.deb
- string Description = 15; // the apt filename pool/main/f/foo/foo_2.2.2_riscv64.deb
- string SHA1 = 16; // the apt filename pool/main/f/foo/foo_2.2.2_riscv64.deb
- string MD5SUM = 17; // the apt filename pool/main/f/foo/foo_2.2.2_riscv64.deb
- string SHA256 = 18; // the apt filename pool/main/f/foo/foo_2.2.2_riscv64.deb
- string SHA512 = 19; // the apt filename pool/main/f/foo/foo_2.2.2_riscv64.deb
+ string name = 1; // `autogenpb:unique` `autogenpb:sort`
+ google.protobuf.Timestamp laststamp = 2; // the last time this package was seen (used to timeout entries)
+ google.protobuf.Timestamp ctime = 3; // the last time this package was seen (used to timeout entries)
+ string Namespace = 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 Version = 7; // version: 0.0.3
+ string Architecture = 8; //
+ string Source = 9; //
+ string Package = 10; //
+ string Size = 11; //
+ string Depends = 12; //
+ string Maintainer = 13; //
+ string Filename = 14; //
+ string Description = 15; //
+ string Packager = 16; //
+ string Conflicts = 17; //
+ string BuildDepends = 18; //
+ string PackageBuildDate = 19; //
+ string GitTagDate = 20; //
+ string URL = 21; //
+ string SHA1 = 22; //
+ string MD5SUM = 23; //
+ string SHA256 = 24; //
+ string SHA512 = 25; //
+ map<string, string> core = 26; // catch all for whatever is left over
}
-message Packages { // `autogenpb:marshal` `autogenpb:gui` `autogenpb:http`
- string uuid = 1; // `autogenpb:uuid:2f26cc03-ea30-4481-a333-ad0acc86e1d3`
- string version = 2; // `autogenpb:version:v0.0.1`
- repeated Package packages = 3;
- string filename = 4; // `autogenpb:save` -- this enables autogenerated pb.Load() and pb.Save()
+message Packages { // `autogenpb:marshal` `autogenpb:gui` `autogenpb:http`
+ string uuid = 1; // `autogenpb:uuid:2f26cc03-ea30-4481-a333-ad0acc86e1d3`
+ string version = 2; // `autogenpb:version:v0.0.1`
+ repeated Package packages = 3;
+ string filename = 4; // `autogenpb:save` -- this enables autogenerated pb.Load() and pb.Save()
}
diff --git a/tableDefault.go b/tableDefault.go
index 038fe4d..4d39176 100644
--- a/tableDefault.go
+++ b/tableDefault.go
@@ -102,11 +102,17 @@ func (m *Machine) makeSmartTable(pb *Packages) *PackagesTable {
col.Width = 3
col = t.AddName()
- col.Width = 30
+ col.Width = 16
col = t.AddVersion()
col.Width = 20
+ col = t.AddMD5SUM()
+ col.Width = 8
+
+ col = t.AddPackageBuildDate()
+ col.Width = 20
+
col = t.AddPkgName()
col.Width = -1
col.Header.Name = "apt package path"