summaryrefslogtreecommitdiff
path: root/example/toy.proto
diff options
context:
space:
mode:
Diffstat (limited to 'example/toy.proto')
-rw-r--r--example/toy.proto34
1 files changed, 34 insertions, 0 deletions
diff --git a/example/toy.proto b/example/toy.proto
new file mode 100644
index 0000000..a425a0a
--- /dev/null
+++ b/example/toy.proto
@@ -0,0 +1,34 @@
+syntax = "proto3";
+
+
+package main;
+
+import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp
+
+message Basket { // `autogenpb:nomutex`
+ repeated string name = 1; // `autogenpb:sort` `autogenpb:unique`
+ string favorite = 2; // `autogenpb:sort` `autogenpb:unique`
+ int64 price = 3; // `autogenpb:sort`
+ repeated Banana banna = 4;
+ repeated Pear pears = 5;
+ repeated Apple stacks = 6;
+}
+
+// "Fruit" must exist. you can put anything in it
+message Toy {
+ string brand = 1; // `autogenpb:unique` `autogenpb:sort`
+ repeated Apple apples = 2;
+ string name = 4; // `autogenpb:sort` `autogenpb:unique`
+ string UPC = 4; // `autogenpb:sort` `autogenpb:unique`
+ string city = 5; // `autogenpb:sort`
+ repeated Basket Baskets = 8;
+ map<string, string> who = 9;
+ int64 cost = 10;
+}
+
+message Toys { // `autogenpb:marshal` `autogenpb:mutex`
+ string uuid = 1; // `autogenpb:uuid:be456ad9-f07f-484c-adf2-d96eeabf3079`
+ string version = 2; // `autogenpb:version:v0.0.1`
+ repeated Toy Toys = 3; // THIS MUST BE "Fruit" and then "Fruit" + "s"
+ // you can add additional things here but the three lines above must conform to the standard above
+}