Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
|
d2ad8b348a | |
|
ba36e04edf | |
|
6cfc61f4ad |
92
table.proto
92
table.proto
|
@ -5,35 +5,71 @@ syntax = "proto3";
|
||||||
package gitpb;
|
package gitpb;
|
||||||
|
|
||||||
import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp
|
import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp
|
||||||
|
import "google/protobuf/any.proto"; // Import the well-known type for Timestamp
|
||||||
import "widget.proto"; // Import the well-known type for Timestamp
|
import "widget.proto"; // Import the well-known type for Timestamp
|
||||||
|
|
||||||
message StringRow {
|
//
|
||||||
Widget header = 1;
|
// this code was written this way to make it easy for me
|
||||||
repeated string vals = 2;
|
// to originally implement and auto generate the needed code
|
||||||
repeated Widget widgets = 3;
|
// with autogenpb
|
||||||
}
|
//
|
||||||
|
|
||||||
message ButtonRow {
|
// experiments in various options. think about this more.
|
||||||
Widget header = 1;
|
|
||||||
repeated string vals = 2;
|
|
||||||
repeated Widget widgets = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
message IntRow {
|
message ColAttr {
|
||||||
Widget header = 1;
|
enum VarType {
|
||||||
repeated int64 vals = 2;
|
ANY = 0;
|
||||||
repeated Widget widgets = 3;
|
INT = 1;
|
||||||
|
STRING = 2;
|
||||||
|
TIME = 3;
|
||||||
|
DURATION = 4;
|
||||||
|
BYTES = 5;
|
||||||
|
}
|
||||||
|
int32 pad = 1;
|
||||||
|
int32 width = 2;
|
||||||
|
bool click = 3;
|
||||||
|
VarType type = 4;
|
||||||
}
|
}
|
||||||
|
message StringCol {
|
||||||
message TimeRow {
|
|
||||||
Widget header = 1;
|
|
||||||
repeated google.protobuf.Timestamp vals = 2;
|
|
||||||
repeated Widget widgets = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
message BoolRow {
|
|
||||||
Widget header = 1;
|
Widget header = 1;
|
||||||
repeated Widget widgets = 2;
|
repeated Widget widgets = 2;
|
||||||
|
ColAttr attr = 3;
|
||||||
|
repeated string vals = 4; // deprecate
|
||||||
|
}
|
||||||
|
|
||||||
|
message ButtonCol {
|
||||||
|
Widget header = 1;
|
||||||
|
repeated Widget widgets = 2;
|
||||||
|
ColAttr attr = 3;
|
||||||
|
repeated string vals = 4; // deprecate
|
||||||
|
}
|
||||||
|
|
||||||
|
message IntCol {
|
||||||
|
Widget header = 1;
|
||||||
|
repeated Widget widgets = 2;
|
||||||
|
ColAttr attr = 3;
|
||||||
|
repeated int64 vals = 4; // deprecate
|
||||||
|
}
|
||||||
|
|
||||||
|
message TimeCol {
|
||||||
|
Widget header = 1;
|
||||||
|
repeated Widget widgets = 2;
|
||||||
|
ColAttr attr = 3;
|
||||||
|
repeated google.protobuf.Timestamp vals = 4; // deprecate
|
||||||
|
}
|
||||||
|
|
||||||
|
message BoolCol {
|
||||||
|
Widget header = 1;
|
||||||
|
repeated Widget widgets = 2;
|
||||||
|
ColAttr attr = 3;
|
||||||
|
repeated bool vals = 4; // deprecate
|
||||||
|
}
|
||||||
|
|
||||||
|
message AnyCol {
|
||||||
|
Widget header = 1;
|
||||||
|
repeated Widget widgets = 2;
|
||||||
|
ColAttr attr = 3;
|
||||||
|
repeated google.protobuf.Any vals = 4; // deprecate
|
||||||
}
|
}
|
||||||
|
|
||||||
message Table { // `autogenpb:marshal`
|
message Table { // `autogenpb:marshal`
|
||||||
|
@ -42,11 +78,13 @@ message Table { // `autogenpb:
|
||||||
Widget parent = 3;
|
Widget parent = 3;
|
||||||
Widget grid = 4;
|
Widget grid = 4;
|
||||||
repeated string order = 5;
|
repeated string order = 5;
|
||||||
repeated StringRow stringRows = 6;
|
repeated StringCol stringCols = 6;
|
||||||
repeated IntRow intRows = 7;
|
repeated IntCol intCols = 7;
|
||||||
repeated TimeRow timeRows = 8;
|
repeated TimeCol timeCols = 8;
|
||||||
repeated BoolRow boolRows = 9;
|
repeated BoolCol boolCols = 9;
|
||||||
repeated ButtonRow buttonRows = 10;
|
repeated ButtonCol buttonCols = 10;
|
||||||
|
repeated AnyCol anyCols = 11;
|
||||||
|
int64 height = 12; // the number of rows
|
||||||
}
|
}
|
||||||
|
|
||||||
message Tables { // `autogenpb:marshal`
|
message Tables { // `autogenpb:marshal`
|
||||||
|
|
Loading…
Reference in New Issue