summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore5
-rw-r--r--Makefile17
-rw-r--r--init.go7
-rw-r--r--table.proto45
-rw-r--r--widget.proto39
5 files changed, 113 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..3429a71
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+go.*
+*.swp
+*.patch
+*.mbox
+*.pb.go
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..f83b728
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,17 @@
+all: clean proto goimports vet
+
+redo: clean proto goimports vet
+
+vet:
+ @GO111MODULE=off go vet
+ @echo this go library builds okay
+
+goimports:
+ goimports -w *.go
+
+proto:
+ autogenpb --proto widget.proto
+ autogenpb --proto table.proto
+
+clean:
+ rm -f go.* *.pb.go
diff --git a/init.go b/init.go
new file mode 100644
index 0000000..53b58d2
--- /dev/null
+++ b/init.go
@@ -0,0 +1,7 @@
+// Copyright 2025 WIT.COM Inc Licensed GPL 3.0
+
+package guipb
+
+func Init() bool {
+ return true
+}
diff --git a/table.proto b/table.proto
new file mode 100644
index 0000000..8acf6e9
--- /dev/null
+++ b/table.proto
@@ -0,0 +1,45 @@
+syntax = "proto3";
+
+// playing around with ideas here
+
+package gitpb;
+
+import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp
+// import "google/protobuf/any.proto"; // Import 'Any'
+import "widget.proto"; // Import the well-known type for Timestamp
+
+
+message StringRow {
+ string header = 1; //
+ repeated string vals = 2; //
+ repeated Widget widgetS = 3; //
+}
+
+message IntRow {
+ Widget header = 1; //
+ repeated Widget widgets = 2; //
+}
+
+message TimeRow {
+ Widget header = 1; //
+ repeated Widget widgets = 2; //
+}
+
+message BoolRow {
+ Widget header = 1; //
+ repeated Widget widgets = 2; //
+}
+
+message Table {
+ repeated string order = 1;
+ repeated StringRow StringRows = 2;
+ repeated IntRow IntRows = 3;
+ repeated TimeRow TimeRows = 4;
+ repeated BoolRow BoolRows = 5;
+}
+
+message Tables {
+ string uuid = 1; // `autogenpb:uuid:c328aa62-3c4f-4d00-9244-cc44ae75ab1b`
+ string version = 2; // `autogenpb:version:v1`
+ repeated Table Tables = 3;
+}
diff --git a/widget.proto b/widget.proto
new file mode 100644
index 0000000..96c799b
--- /dev/null
+++ b/widget.proto
@@ -0,0 +1,39 @@
+syntax = "proto3";
+
+// playing around with ideas here
+
+package gitpb;
+
+// import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp
+import "google/protobuf/any.proto"; // Import 'Any'
+
+
+message Size {
+ int64 width = 1;
+ int64 height = 2;
+}
+
+message Location {
+ int64 x = 1;
+ int64 y = 2;
+}
+
+message Tree {
+ Widget parent = 1;
+ repeated Widget children = 2;
+}
+
+message Widget {
+ int64 id = 1;
+ string name = 2;
+ Size size = 3;
+ Location location = 4;
+ string color = 5;
+ google.protobuf.Any TK = 6;
+}
+
+message Widgets {
+ string uuid = 1; // `autogenpb:uuid:0331fcd7-3c8c-43e4-be1b-77db6a6bc58c`
+ string version = 2; // `autogenpb:version:v1`
+ repeated Widget Widgets = 3;
+}