github.com/whiteCcinn/protobuf-go@v1.0.9/internal/testprotos/test3/test.proto (about)

     1  // Copyright 2018 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  syntax = "proto3";
     6  
     7  package goproto.proto.test3;
     8  
     9  import "internal/testprotos/test3/test_import.proto";
    10  
    11  option go_package = "github.com/whiteCcinn/protobuf-go/internal/testprotos/test3";
    12  
    13  message TestAllTypes {
    14    message NestedMessage {
    15      int32 a = 1;
    16      TestAllTypes corecursive = 2;
    17    }
    18  
    19    enum NestedEnum {
    20      FOO = 0;
    21      BAR = 1;
    22      BAZ = 2;
    23      NEG = -1;  // Intentionally negative.
    24    }
    25  
    26    int32         singular_int32    = 81;
    27    int64         singular_int64    = 82;
    28    uint32        singular_uint32   = 83;
    29    uint64        singular_uint64   = 84;
    30    sint32        singular_sint32   = 85;
    31    sint64        singular_sint64   = 86;
    32    fixed32       singular_fixed32  = 87;
    33    fixed64       singular_fixed64  = 88;
    34    sfixed32      singular_sfixed32 = 89;
    35    sfixed64      singular_sfixed64 = 90;
    36    float         singular_float    = 91;
    37    double        singular_double   = 92;
    38    bool          singular_bool     = 93;
    39    string        singular_string   = 94;
    40    bytes         singular_bytes    = 95;
    41    NestedMessage  singular_nested_message  = 98;
    42    ForeignMessage singular_foreign_message = 99;
    43    ImportMessage  singular_import_message  = 100;
    44    NestedEnum     singular_nested_enum     = 101;
    45    ForeignEnum    singular_foreign_enum    = 102;
    46    ImportEnum     singular_import_enum     = 103;
    47  
    48    optional int32         optional_int32    =  1;
    49    optional int64         optional_int64    =  2;
    50    optional uint32        optional_uint32   =  3;
    51    optional uint64        optional_uint64   =  4;
    52    optional sint32        optional_sint32   =  5;
    53    optional sint64        optional_sint64   =  6;
    54    optional fixed32       optional_fixed32  =  7;
    55    optional fixed64       optional_fixed64  =  8;
    56    optional sfixed32      optional_sfixed32 =  9;
    57    optional sfixed64      optional_sfixed64 = 10;
    58    optional float         optional_float    = 11;
    59    optional double        optional_double   = 12;
    60    optional bool          optional_bool     = 13;
    61    optional string        optional_string   = 14;
    62    optional bytes         optional_bytes    = 15;
    63    optional NestedMessage  optional_nested_message  = 18;
    64    optional ForeignMessage optional_foreign_message = 19;
    65    optional ImportMessage  optional_import_message  = 20;
    66    optional NestedEnum     optional_nested_enum     = 21;
    67    optional ForeignEnum    optional_foreign_enum    = 22;
    68    optional ImportEnum     optional_import_enum     = 23;
    69  
    70    repeated int32         repeated_int32    = 31;
    71    repeated int64         repeated_int64    = 32;
    72    repeated uint32        repeated_uint32   = 33;
    73    repeated uint64        repeated_uint64   = 34;
    74    repeated sint32        repeated_sint32   = 35;
    75    repeated sint64        repeated_sint64   = 36;
    76    repeated fixed32       repeated_fixed32  = 37;
    77    repeated fixed64       repeated_fixed64  = 38;
    78    repeated sfixed32      repeated_sfixed32 = 39;
    79    repeated sfixed64      repeated_sfixed64 = 40;
    80    repeated float         repeated_float    = 41;
    81    repeated double        repeated_double   = 42;
    82    repeated bool          repeated_bool     = 43;
    83    repeated string        repeated_string   = 44;
    84    repeated bytes         repeated_bytes    = 45;
    85    repeated NestedMessage  repeated_nested_message  = 48;
    86    repeated ForeignMessage repeated_foreign_message = 49;
    87    repeated ImportMessage  repeated_importmessage   = 50;
    88    repeated NestedEnum     repeated_nested_enum     = 51;
    89    repeated ForeignEnum    repeated_foreign_enum    = 52;
    90    repeated ImportEnum     repeated_importenum      = 53;
    91  
    92    map <   int32, int32>         map_int32_int32           = 56;
    93    map <   int64, int64>         map_int64_int64           = 57;
    94    map <  uint32, uint32>        map_uint32_uint32         = 58;
    95    map <  uint64, uint64>        map_uint64_uint64         = 59;
    96    map <  sint32, sint32>        map_sint32_sint32         = 60;
    97    map <  sint64, sint64>        map_sint64_sint64         = 61;
    98    map < fixed32, fixed32>       map_fixed32_fixed32       = 62;
    99    map < fixed64, fixed64>       map_fixed64_fixed64       = 63;
   100    map <sfixed32, sfixed32>      map_sfixed32_sfixed32     = 64;
   101    map <sfixed64, sfixed64>      map_sfixed64_sfixed64     = 65;
   102    map <   int32, float>         map_int32_float           = 66;
   103    map <   int32, double>        map_int32_double          = 67;
   104    map <    bool, bool>          map_bool_bool             = 68;
   105    map <  string, string>        map_string_string         = 69;
   106    map <  string, bytes>         map_string_bytes          = 70;
   107    map <  string, NestedMessage> map_string_nested_message = 71;
   108    map <  string, NestedEnum>    map_string_nested_enum    = 73;
   109  
   110    oneof oneof_field {
   111      uint32        oneof_uint32         = 111;
   112      NestedMessage oneof_nested_message = 112;
   113      string        oneof_string         = 113;
   114      bytes         oneof_bytes          = 114;
   115      bool          oneof_bool           = 115;
   116      uint64        oneof_uint64         = 116;
   117      float         oneof_float          = 117;
   118      double        oneof_double         = 118;
   119      NestedEnum    oneof_enum           = 119;
   120    }
   121  }
   122  
   123  message ForeignMessage {
   124    int32 c = 1;
   125    int32 d = 2;
   126  }
   127  
   128  enum ForeignEnum {
   129    FOREIGN_ZERO = 0;
   130    FOREIGN_FOO = 4;
   131    FOREIGN_BAR = 5;
   132    FOREIGN_BAZ = 6;
   133  }