summaryrefslogtreecommitdiff
path: root/file.proto
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-10 07:40:24 -0600
committerJeff Carr <[email protected]>2025-01-10 07:40:24 -0600
commite07c6a35fd5d2ca1b3a6c09d9781d21f676f52f2 (patch)
treece7a4fd38fff09571739bedd5d6dd00d99cff4b7 /file.proto
parentd9e5edb3a8486bc884841137095dd910e42b3a98 (diff)
detect that autogenpb has already been run and exit
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