github.com/jhump/protoreflect@v1.16.0/desc/protoprint/testfiles/test-non-files-compact.txt (about)

     1  -------- desc_test_comments.proto (*desc.FileDescriptor) --------
     2  syntax = "proto2";
     3  package foo.bar;
     4  import "desc_test_options.proto";
     5  import public "google/protobuf/empty.proto";
     6  option go_package = "github.com/jhump/protoreflect/internal/testprotos";
     7  message AnEmptyMessage {
     8  }
     9  // We need a request for our RPC service below.
    10  message Request {
    11    option deprecated = true;
    12    option (.testprotos.mfubar) = true;
    13    // A field comment
    14    repeated int32 ids = 1 [
    15      json_name = "|foo|",
    16      packed = true,
    17      (.testprotos.ffubar) = "abc",
    18      (.testprotos.ffubarb) = "xyz"
    19    ];
    20    // label comment
    21    optional string name = 2 [default = "fubar"];
    22    // Group comment with emoji 😀 😍 👻 ❤ 💯 💥 🐶 🦂 🥑 🍻 🌍 🚕 🪐
    23    optional group Extras = 3 {
    24      option no_standard_descriptor_accessor = false;
    25      option (.testprotos.mfubar) = false;
    26      optional double dbl = 1;
    27      optional float flt = 2;
    28      // Leading comment...
    29      optional string str = 3;
    30    }
    31    // can be this or that
    32    oneof abc {
    33      string this = 4;
    34      int32 that = 5;
    35    }
    36    // can be these or those
    37    oneof xyz {
    38      option (.testprotos.oofubar) = "whoops, this has invalid UTF8! \274\377";
    39      string these = 6;
    40      int32 those = 7;
    41    }
    42    // map field
    43    map<string, string> things = 8;
    44    enum MarioCharacters {
    45      option allow_alias = true;
    46      option (.testprotos.efubar) = 123;
    47      option (.testprotos.efubars) = -321;
    48      SNIFIT = -101;
    49      MARIO = 1 [
    50        (.testprotos.evfubar) = 278,
    51        (.testprotos.evfubars) = -314
    52      ];
    53      LUIGI = 2 [
    54        (.testprotos.evfubaru) = 200,
    55        (.testprotos.evfubaruf) = 100
    56      ];
    57      PEACH = 3;
    58      BOWSER = 4;
    59      WARIO = 5;
    60      WALUIGI = 6;
    61      HEY_HO = 7;
    62      SHY_GUY = 7 [(.testprotos.evfubarsf) = 10101];
    63      KAMEK = 8;
    64      MAGIKOOPA = 8;
    65    }
    66    extensions 100 to 200;
    67    extensions 201 to 250 [
    68      (.testprotos.exfubar) = "splat!",
    69      (.testprotos.exfubarb) = "\000\001\002\003\004\005\006\007"
    70    ];
    71    reserved 10 to 20, 30 to 50;
    72    reserved "bar", "baz", "foo";
    73  }
    74  // Service comment
    75  service RpcService {
    76    option deprecated = false;
    77    option (.testprotos.sfubar) = { id: 100, name: "bob" };
    78    option (.testprotos.sfubare) = VALUE;
    79    // Method comment
    80    rpc StreamingRpc ( stream .foo.bar.Request ) returns ( .foo.bar.Request );
    81    rpc UnaryRpc ( .foo.bar.Request ) returns ( .google.protobuf.Empty ) {
    82      option deprecated = true;
    83      option (.testprotos.mtfubar) = 12.340000;
    84      option (.testprotos.mtfubard) = 123.456000;
    85    }
    86  }
    87  extend .foo.bar.Request {
    88    // comment for guid1
    89    optional uint64 guid1 = 123;
    90    // ... and a comment for guid2
    91    optional uint64 guid2 = 124;
    92  }
    93  -------- foo.bar.Request (*desc.MessageDescriptor) --------
    94  // We need a request for our RPC service below.
    95  message Request {
    96    option deprecated = true;
    97    option (.testprotos.mfubar) = true;
    98    // A field comment
    99    repeated int32 ids = 1 [
   100      json_name = "|foo|",
   101      packed = true,
   102      (.testprotos.ffubar) = "abc",
   103      (.testprotos.ffubarb) = "xyz"
   104    ];
   105    // label comment
   106    optional string name = 2 [default = "fubar"];
   107    // Group comment with emoji 😀 😍 👻 ❤ 💯 💥 🐶 🦂 🥑 🍻 🌍 🚕 🪐
   108    optional group Extras = 3 {
   109      option no_standard_descriptor_accessor = false;
   110      option (.testprotos.mfubar) = false;
   111      optional double dbl = 1;
   112      optional float flt = 2;
   113      // Leading comment...
   114      optional string str = 3;
   115    }
   116    // can be this or that
   117    oneof abc {
   118      string this = 4;
   119      int32 that = 5;
   120    }
   121    // can be these or those
   122    oneof xyz {
   123      option (.testprotos.oofubar) = "whoops, this has invalid UTF8! \274\377";
   124      string these = 6;
   125      int32 those = 7;
   126    }
   127    // map field
   128    map<string, string> things = 8;
   129    enum MarioCharacters {
   130      option allow_alias = true;
   131      option (.testprotos.efubar) = 123;
   132      option (.testprotos.efubars) = -321;
   133      SNIFIT = -101;
   134      MARIO = 1 [
   135        (.testprotos.evfubar) = 278,
   136        (.testprotos.evfubars) = -314
   137      ];
   138      LUIGI = 2 [
   139        (.testprotos.evfubaru) = 200,
   140        (.testprotos.evfubaruf) = 100
   141      ];
   142      PEACH = 3;
   143      BOWSER = 4;
   144      WARIO = 5;
   145      WALUIGI = 6;
   146      HEY_HO = 7;
   147      SHY_GUY = 7 [(.testprotos.evfubarsf) = 10101];
   148      KAMEK = 8;
   149      MAGIKOOPA = 8;
   150    }
   151    extensions 100 to 200;
   152    extensions 201 to 250 [
   153      (.testprotos.exfubar) = "splat!",
   154      (.testprotos.exfubarb) = "\000\001\002\003\004\005\006\007"
   155    ];
   156    reserved 10 to 20, 30 to 50;
   157    reserved "bar", "baz", "foo";
   158  }
   159  -------- foo.bar.Request.ids (*desc.FieldDescriptor) --------
   160  // A field comment
   161  repeated int32 ids = 1 [
   162    json_name = "|foo|",
   163    packed = true,
   164    (.testprotos.ffubar) = "abc",
   165    (.testprotos.ffubarb) = "xyz"
   166  ];
   167  -------- foo.bar.Request.name (*desc.FieldDescriptor) --------
   168  // label comment
   169  optional string name = 2 [default = "fubar"];
   170  -------- foo.bar.Request.extras (*desc.FieldDescriptor) --------
   171  // Group comment with emoji 😀 😍 👻 ❤ 💯 💥 🐶 🦂 🥑 🍻 🌍 🚕 🪐
   172  optional group Extras = 3 {
   173    option no_standard_descriptor_accessor = false;
   174    option (.testprotos.mfubar) = false;
   175    optional double dbl = 1;
   176    optional float flt = 2;
   177    // Leading comment...
   178    optional string str = 3;
   179  }
   180  -------- foo.bar.Request.this (*desc.FieldDescriptor) --------
   181  string this = 4;
   182  -------- foo.bar.Request.that (*desc.FieldDescriptor) --------
   183  int32 that = 5;
   184  -------- foo.bar.Request.these (*desc.FieldDescriptor) --------
   185  string these = 6;
   186  -------- foo.bar.Request.those (*desc.FieldDescriptor) --------
   187  int32 those = 7;
   188  -------- foo.bar.Request.things (*desc.FieldDescriptor) --------
   189  // map field
   190  map<string, string> things = 8;
   191  -------- foo.bar.Request.abc (*desc.OneOfDescriptor) --------
   192  oneof abc {
   193    string this = 4;
   194    int32 that = 5;
   195  }
   196  -------- foo.bar.Request.xyz (*desc.OneOfDescriptor) --------
   197  oneof xyz {
   198    option (.testprotos.oofubar) = "whoops, this has invalid UTF8! \274\377";
   199    string these = 6;
   200    int32 those = 7;
   201  }
   202  -------- foo.bar.Request.Extras (*desc.MessageDescriptor) --------
   203  // Group comment with emoji 😀 😍 👻 ❤ 💯 💥 🐶 🦂 🥑 🍻 🌍 🚕 🪐
   204  message Extras {
   205    option no_standard_descriptor_accessor = false;
   206    option (.testprotos.mfubar) = false;
   207    optional double dbl = 1;
   208    optional float flt = 2;
   209    // Leading comment...
   210    optional string str = 3;
   211  }
   212  -------- foo.bar.Request.Extras.dbl (*desc.FieldDescriptor) --------
   213  optional double dbl = 1;
   214  -------- foo.bar.Request.Extras.flt (*desc.FieldDescriptor) --------
   215  optional float flt = 2;
   216  -------- foo.bar.Request.Extras.str (*desc.FieldDescriptor) --------
   217  // Leading comment...
   218  optional string str = 3;
   219  -------- foo.bar.Request.ThingsEntry (*desc.MessageDescriptor) --------
   220  message ThingsEntry {
   221    option map_entry = true;
   222    optional string key = 1;
   223    optional string value = 2;
   224  }
   225  -------- foo.bar.Request.ThingsEntry.key (*desc.FieldDescriptor) --------
   226  optional string key = 1;
   227  -------- foo.bar.Request.ThingsEntry.value (*desc.FieldDescriptor) --------
   228  optional string value = 2;
   229  -------- foo.bar.Request.MarioCharacters (*desc.EnumDescriptor) --------
   230  enum MarioCharacters {
   231    option allow_alias = true;
   232    option (.testprotos.efubar) = 123;
   233    option (.testprotos.efubars) = -321;
   234    SNIFIT = -101;
   235    MARIO = 1 [
   236      (.testprotos.evfubar) = 278,
   237      (.testprotos.evfubars) = -314
   238    ];
   239    LUIGI = 2 [
   240      (.testprotos.evfubaru) = 200,
   241      (.testprotos.evfubaruf) = 100
   242    ];
   243    PEACH = 3;
   244    BOWSER = 4;
   245    WARIO = 5;
   246    WALUIGI = 6;
   247    HEY_HO = 7;
   248    SHY_GUY = 7 [(.testprotos.evfubarsf) = 10101];
   249    KAMEK = 8;
   250    MAGIKOOPA = 8;
   251  }
   252  -------- foo.bar.Request.MarioCharacters.MARIO (*desc.EnumValueDescriptor) --------
   253  MARIO = 1 [
   254    (.testprotos.evfubar) = 278,
   255    (.testprotos.evfubars) = -314
   256  ];
   257  -------- foo.bar.Request.MarioCharacters.LUIGI (*desc.EnumValueDescriptor) --------
   258  LUIGI = 2 [
   259    (.testprotos.evfubaru) = 200,
   260    (.testprotos.evfubaruf) = 100
   261  ];
   262  -------- foo.bar.Request.MarioCharacters.PEACH (*desc.EnumValueDescriptor) --------
   263  PEACH = 3;
   264  -------- foo.bar.Request.MarioCharacters.BOWSER (*desc.EnumValueDescriptor) --------
   265  BOWSER = 4;
   266  -------- foo.bar.Request.MarioCharacters.WARIO (*desc.EnumValueDescriptor) --------
   267  WARIO = 5;
   268  -------- foo.bar.Request.MarioCharacters.WALUIGI (*desc.EnumValueDescriptor) --------
   269  WALUIGI = 6;
   270  -------- foo.bar.Request.MarioCharacters.SHY_GUY (*desc.EnumValueDescriptor) --------
   271  SHY_GUY = 7 [(.testprotos.evfubarsf) = 10101];
   272  -------- foo.bar.Request.MarioCharacters.HEY_HO (*desc.EnumValueDescriptor) --------
   273  HEY_HO = 7;
   274  -------- foo.bar.Request.MarioCharacters.MAGIKOOPA (*desc.EnumValueDescriptor) --------
   275  MAGIKOOPA = 8;
   276  -------- foo.bar.Request.MarioCharacters.KAMEK (*desc.EnumValueDescriptor) --------
   277  KAMEK = 8;
   278  -------- foo.bar.Request.MarioCharacters.SNIFIT (*desc.EnumValueDescriptor) --------
   279  SNIFIT = -101;
   280  -------- foo.bar.AnEmptyMessage (*desc.MessageDescriptor) --------
   281  message AnEmptyMessage {
   282  }
   283  -------- foo.bar.guid1 (*desc.FieldDescriptor) --------
   284  extend .foo.bar.Request {
   285    // comment for guid1
   286    optional uint64 guid1 = 123;
   287  }
   288  -------- foo.bar.guid2 (*desc.FieldDescriptor) --------
   289  extend .foo.bar.Request {
   290    // ... and a comment for guid2
   291    optional uint64 guid2 = 124;
   292  }
   293  -------- foo.bar.RpcService (*desc.ServiceDescriptor) --------
   294  // Service comment
   295  service RpcService {
   296    option deprecated = false;
   297    option (.testprotos.sfubar) = { id: 100, name: "bob" };
   298    option (.testprotos.sfubare) = VALUE;
   299    // Method comment
   300    rpc StreamingRpc ( stream .foo.bar.Request ) returns ( .foo.bar.Request );
   301    rpc UnaryRpc ( .foo.bar.Request ) returns ( .google.protobuf.Empty ) {
   302      option deprecated = true;
   303      option (.testprotos.mtfubar) = 12.340000;
   304      option (.testprotos.mtfubard) = 123.456000;
   305    }
   306  }
   307  -------- foo.bar.RpcService.StreamingRpc (*desc.MethodDescriptor) --------
   308  // Method comment
   309  rpc StreamingRpc ( stream .foo.bar.Request ) returns ( .foo.bar.Request );
   310  -------- foo.bar.RpcService.UnaryRpc (*desc.MethodDescriptor) --------
   311  rpc UnaryRpc ( .foo.bar.Request ) returns ( .google.protobuf.Empty ) {
   312    option deprecated = true;
   313    option (.testprotos.mtfubar) = 12.340000;
   314    option (.testprotos.mtfubard) = 123.456000;
   315  }