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