This commit is contained in:
Jeff Carr 2025-02-13 17:24:27 -06:00
commit 9a2f103589
5 changed files with 113 additions and 0 deletions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
go.*
*.swp
*.patch
*.mbox
*.pb.go

17
Makefile Normal file
View File

@ -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

7
init.go Normal file
View File

@ -0,0 +1,7 @@
// Copyright 2025 WIT.COM Inc Licensed GPL 3.0
package guipb
func Init() bool {
return true
}

45
table.proto Normal file
View File

@ -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;
}

39
widget.proto Normal file
View File

@ -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;
}