Day 1
This commit is contained in:
commit
9a2f103589
|
@ -0,0 +1,5 @@
|
||||||
|
go.*
|
||||||
|
*.swp
|
||||||
|
*.patch
|
||||||
|
*.mbox
|
||||||
|
*.pb.go
|
|
@ -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
|
|
@ -0,0 +1,7 @@
|
||||||
|
// Copyright 2025 WIT.COM Inc Licensed GPL 3.0
|
||||||
|
|
||||||
|
package guipb
|
||||||
|
|
||||||
|
func Init() bool {
|
||||||
|
return true
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
Loading…
Reference in New Issue