summaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
Diffstat (limited to 'example')
-rw-r--r--example/fruit.proto10
1 files changed, 5 insertions, 5 deletions
diff --git a/example/fruit.proto b/example/fruit.proto
index d43a741..65e36f1 100644
--- a/example/fruit.proto
+++ b/example/fruit.proto
@@ -15,24 +15,24 @@ package main;
import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp
-message Apple { // `autogenpb:marshal`
+message Apple {
string name = 1; // `autogenpb:unique` // generates SortByxxx() and AppendUnique() functions
string genus = 2; // `autogenpb:unique` // generates same thing here but SortByGenus()
google.protobuf.Timestamp ctime = 3; // when the apple was born
}
-message Pear {
+message Pear { // `autogenpb:nomutex`
string name = 1; // `autogenpb:sort`
string favorite = 2; // `autogenpb:sort` `autogenpb:unique`
}
-message Banana {
+message Banana { // `autogenpb:nomutex`
repeated string name = 1; // `autogenpb:sort`
string favorite = 2; // `autogenpb:sort` `autogenpb:unique`
string country = 3; // `autogenpb:sort`
}
-message Basket {
+message Basket { // `autogenpb:nomutex`
repeated string name = 1; // `autogenpb:sort` `autogenpb:unique`
string favorite = 2; // `autogenpb:sort` `autogenpb:unique`
int64 price = 3; // `autogenpb:sort`
@@ -42,7 +42,7 @@ message Basket {
}
// "Fruit" must exist. you can put anything in it
-message Fruit { // `autogenpb:marshal`
+message Fruit {
string brand = 1; // `autogenpb:unique` `autogenpb:sort`
repeated Apple apples = 2;
repeated Pear pears = 3;