diff options
| author | Jeff Carr <[email protected]> | 2025-01-12 01:32:52 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-01-12 01:32:52 -0600 |
| commit | cfd9ec5ccddded628f4f9bf95beefc11dcfeb51b (patch) | |
| tree | 9db213a7458b52cec79ee68a0a2911ed2cb4b2f3 /example/fruit.proto | |
| parent | 0d2dc9fb2518a34d5f60836a92ebeef4d57a3943 (diff) | |
refactor again. I want to make this clean
as clean as possible because, I use this tool alot. everywhere.
I want it to always work. I need do not want it to break
Diffstat (limited to 'example/fruit.proto')
| -rw-r--r-- | example/fruit.proto | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/example/fruit.proto b/example/fruit.proto index 92e46ef..d43a741 100644 --- a/example/fruit.proto +++ b/example/fruit.proto @@ -22,17 +22,35 @@ message Apple { // `autogenpb:marshal` } message Pear { - string name = 1; // - string favorite = 2; // `autogenpb:sort` + string name = 1; // `autogenpb:sort` + string favorite = 2; // `autogenpb:sort` `autogenpb:unique` +} + +message Banana { + repeated string name = 1; // `autogenpb:sort` + string favorite = 2; // `autogenpb:sort` `autogenpb:unique` + string country = 3; // `autogenpb:sort` +} + +message Basket { + 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 Fruit { // `autogenpb:marshal` - string brand = 1; // `autogenpb:unique` `autogenpb:sort` - repeated Apple apples = 2; - repeated Pear pears = 3; - string UPC = 4; // `autogenpb:sort` `autogenpb:unique` - string city = 5; // `autogenpb:sort` + string brand = 1; // `autogenpb:unique` `autogenpb:sort` + repeated Apple apples = 2; + repeated Pear pears = 3; + string UPC = 4; // `autogenpb:sort` `autogenpb:unique` + string city = 5; // `autogenpb:sort` + repeated Pear notpears = 6; + repeated Pear fakepears = 7; + repeated Basket gifts = 8; } // "Fruits" MUST EXIST and start exactly this way @@ -43,4 +61,5 @@ message Fruits { // `autogenpb:marshal` `autogenpb:mutex` repeated Fruit Fruits = 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 int64 cost = 4; + map<string, string> junk = 5; } |
