summaryrefslogtreecommitdiff
path: root/file.proto
diff options
context:
space:
mode:
Diffstat (limited to 'file.proto')
-rw-r--r--file.proto8
1 files changed, 8 insertions, 0 deletions
diff --git a/file.proto b/file.proto
index 740761d..18b096a 100644
--- a/file.proto
+++ b/file.proto
@@ -25,6 +25,12 @@ package main;
// it needs in these protobuf files, then it processes the
// protobuf files to write out *.sort.pb.go and *.marshal.pb.go files
//
+message MsgVar {
+ string varName = 1; // the variable name
+ string varType = 2; // the variable type
+ bool isRepeated = 3; // does the variable repeate
+}
+
message MsgName {
string name = 1; // the name of the message aka struct. for this example: "Shelf"
string lockname = 2; // name of the lockfile. ends in Mu
@@ -34,6 +40,7 @@ message MsgName {
bool mutexFound = 6; // true if the mutex was added to the protoc pb.go file
repeated string sort = 7; // keys to sort on
repeated string unique = 8; // if the fields should have AppendUnique() functions
+ repeated MsgVar vars = 9; // store all the vars in the message
}
message File {
@@ -48,6 +55,7 @@ message File {
// every struct in this proto file, this file has: "Apple", "Apples", ... "File", etc...
repeated MsgName msgNames = 9;
+ repeated MsgName sortNames = 10; // variables that are repeated can have the standard functions generated (Sort(), etc)
}
// I know, I know, the whole point of using protobuf