github.com/hashicorp/go-plugin@v1.6.0/examples/bidirectional/proto/kv.pb.go (about) 1 // Copyright (c) HashiCorp, Inc. 2 // SPDX-License-Identifier: MPL-2.0 3 4 // Code generated by protoc-gen-go. DO NOT EDIT. 5 // versions: 6 // protoc-gen-go v1.31.0 7 // protoc (unknown) 8 // source: proto/kv.proto 9 10 package proto 11 12 import ( 13 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 14 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 15 reflect "reflect" 16 sync "sync" 17 ) 18 19 const ( 20 // Verify that this generated code is sufficiently up-to-date. 21 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 22 // Verify that runtime/protoimpl is sufficiently up-to-date. 23 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 24 ) 25 26 type GetRequest struct { 27 state protoimpl.MessageState 28 sizeCache protoimpl.SizeCache 29 unknownFields protoimpl.UnknownFields 30 31 Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` 32 } 33 34 func (x *GetRequest) Reset() { 35 *x = GetRequest{} 36 if protoimpl.UnsafeEnabled { 37 mi := &file_proto_kv_proto_msgTypes[0] 38 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 39 ms.StoreMessageInfo(mi) 40 } 41 } 42 43 func (x *GetRequest) String() string { 44 return protoimpl.X.MessageStringOf(x) 45 } 46 47 func (*GetRequest) ProtoMessage() {} 48 49 func (x *GetRequest) ProtoReflect() protoreflect.Message { 50 mi := &file_proto_kv_proto_msgTypes[0] 51 if protoimpl.UnsafeEnabled && x != nil { 52 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 53 if ms.LoadMessageInfo() == nil { 54 ms.StoreMessageInfo(mi) 55 } 56 return ms 57 } 58 return mi.MessageOf(x) 59 } 60 61 // Deprecated: Use GetRequest.ProtoReflect.Descriptor instead. 62 func (*GetRequest) Descriptor() ([]byte, []int) { 63 return file_proto_kv_proto_rawDescGZIP(), []int{0} 64 } 65 66 func (x *GetRequest) GetKey() string { 67 if x != nil { 68 return x.Key 69 } 70 return "" 71 } 72 73 type GetResponse struct { 74 state protoimpl.MessageState 75 sizeCache protoimpl.SizeCache 76 unknownFields protoimpl.UnknownFields 77 78 Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` 79 } 80 81 func (x *GetResponse) Reset() { 82 *x = GetResponse{} 83 if protoimpl.UnsafeEnabled { 84 mi := &file_proto_kv_proto_msgTypes[1] 85 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 86 ms.StoreMessageInfo(mi) 87 } 88 } 89 90 func (x *GetResponse) String() string { 91 return protoimpl.X.MessageStringOf(x) 92 } 93 94 func (*GetResponse) ProtoMessage() {} 95 96 func (x *GetResponse) ProtoReflect() protoreflect.Message { 97 mi := &file_proto_kv_proto_msgTypes[1] 98 if protoimpl.UnsafeEnabled && x != nil { 99 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 100 if ms.LoadMessageInfo() == nil { 101 ms.StoreMessageInfo(mi) 102 } 103 return ms 104 } 105 return mi.MessageOf(x) 106 } 107 108 // Deprecated: Use GetResponse.ProtoReflect.Descriptor instead. 109 func (*GetResponse) Descriptor() ([]byte, []int) { 110 return file_proto_kv_proto_rawDescGZIP(), []int{1} 111 } 112 113 func (x *GetResponse) GetValue() int64 { 114 if x != nil { 115 return x.Value 116 } 117 return 0 118 } 119 120 type PutRequest struct { 121 state protoimpl.MessageState 122 sizeCache protoimpl.SizeCache 123 unknownFields protoimpl.UnknownFields 124 125 AddServer uint32 `protobuf:"varint,1,opt,name=add_server,json=addServer,proto3" json:"add_server,omitempty"` 126 Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` 127 Value int64 `protobuf:"varint,3,opt,name=value,proto3" json:"value,omitempty"` 128 } 129 130 func (x *PutRequest) Reset() { 131 *x = PutRequest{} 132 if protoimpl.UnsafeEnabled { 133 mi := &file_proto_kv_proto_msgTypes[2] 134 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 135 ms.StoreMessageInfo(mi) 136 } 137 } 138 139 func (x *PutRequest) String() string { 140 return protoimpl.X.MessageStringOf(x) 141 } 142 143 func (*PutRequest) ProtoMessage() {} 144 145 func (x *PutRequest) ProtoReflect() protoreflect.Message { 146 mi := &file_proto_kv_proto_msgTypes[2] 147 if protoimpl.UnsafeEnabled && x != nil { 148 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 149 if ms.LoadMessageInfo() == nil { 150 ms.StoreMessageInfo(mi) 151 } 152 return ms 153 } 154 return mi.MessageOf(x) 155 } 156 157 // Deprecated: Use PutRequest.ProtoReflect.Descriptor instead. 158 func (*PutRequest) Descriptor() ([]byte, []int) { 159 return file_proto_kv_proto_rawDescGZIP(), []int{2} 160 } 161 162 func (x *PutRequest) GetAddServer() uint32 { 163 if x != nil { 164 return x.AddServer 165 } 166 return 0 167 } 168 169 func (x *PutRequest) GetKey() string { 170 if x != nil { 171 return x.Key 172 } 173 return "" 174 } 175 176 func (x *PutRequest) GetValue() int64 { 177 if x != nil { 178 return x.Value 179 } 180 return 0 181 } 182 183 type Empty struct { 184 state protoimpl.MessageState 185 sizeCache protoimpl.SizeCache 186 unknownFields protoimpl.UnknownFields 187 } 188 189 func (x *Empty) Reset() { 190 *x = Empty{} 191 if protoimpl.UnsafeEnabled { 192 mi := &file_proto_kv_proto_msgTypes[3] 193 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 194 ms.StoreMessageInfo(mi) 195 } 196 } 197 198 func (x *Empty) String() string { 199 return protoimpl.X.MessageStringOf(x) 200 } 201 202 func (*Empty) ProtoMessage() {} 203 204 func (x *Empty) ProtoReflect() protoreflect.Message { 205 mi := &file_proto_kv_proto_msgTypes[3] 206 if protoimpl.UnsafeEnabled && x != nil { 207 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 208 if ms.LoadMessageInfo() == nil { 209 ms.StoreMessageInfo(mi) 210 } 211 return ms 212 } 213 return mi.MessageOf(x) 214 } 215 216 // Deprecated: Use Empty.ProtoReflect.Descriptor instead. 217 func (*Empty) Descriptor() ([]byte, []int) { 218 return file_proto_kv_proto_rawDescGZIP(), []int{3} 219 } 220 221 type SumRequest struct { 222 state protoimpl.MessageState 223 sizeCache protoimpl.SizeCache 224 unknownFields protoimpl.UnknownFields 225 226 A int64 `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"` 227 B int64 `protobuf:"varint,2,opt,name=b,proto3" json:"b,omitempty"` 228 } 229 230 func (x *SumRequest) Reset() { 231 *x = SumRequest{} 232 if protoimpl.UnsafeEnabled { 233 mi := &file_proto_kv_proto_msgTypes[4] 234 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 235 ms.StoreMessageInfo(mi) 236 } 237 } 238 239 func (x *SumRequest) String() string { 240 return protoimpl.X.MessageStringOf(x) 241 } 242 243 func (*SumRequest) ProtoMessage() {} 244 245 func (x *SumRequest) ProtoReflect() protoreflect.Message { 246 mi := &file_proto_kv_proto_msgTypes[4] 247 if protoimpl.UnsafeEnabled && x != nil { 248 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 249 if ms.LoadMessageInfo() == nil { 250 ms.StoreMessageInfo(mi) 251 } 252 return ms 253 } 254 return mi.MessageOf(x) 255 } 256 257 // Deprecated: Use SumRequest.ProtoReflect.Descriptor instead. 258 func (*SumRequest) Descriptor() ([]byte, []int) { 259 return file_proto_kv_proto_rawDescGZIP(), []int{4} 260 } 261 262 func (x *SumRequest) GetA() int64 { 263 if x != nil { 264 return x.A 265 } 266 return 0 267 } 268 269 func (x *SumRequest) GetB() int64 { 270 if x != nil { 271 return x.B 272 } 273 return 0 274 } 275 276 type SumResponse struct { 277 state protoimpl.MessageState 278 sizeCache protoimpl.SizeCache 279 unknownFields protoimpl.UnknownFields 280 281 R int64 `protobuf:"varint,1,opt,name=r,proto3" json:"r,omitempty"` 282 } 283 284 func (x *SumResponse) Reset() { 285 *x = SumResponse{} 286 if protoimpl.UnsafeEnabled { 287 mi := &file_proto_kv_proto_msgTypes[5] 288 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 289 ms.StoreMessageInfo(mi) 290 } 291 } 292 293 func (x *SumResponse) String() string { 294 return protoimpl.X.MessageStringOf(x) 295 } 296 297 func (*SumResponse) ProtoMessage() {} 298 299 func (x *SumResponse) ProtoReflect() protoreflect.Message { 300 mi := &file_proto_kv_proto_msgTypes[5] 301 if protoimpl.UnsafeEnabled && x != nil { 302 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 303 if ms.LoadMessageInfo() == nil { 304 ms.StoreMessageInfo(mi) 305 } 306 return ms 307 } 308 return mi.MessageOf(x) 309 } 310 311 // Deprecated: Use SumResponse.ProtoReflect.Descriptor instead. 312 func (*SumResponse) Descriptor() ([]byte, []int) { 313 return file_proto_kv_proto_rawDescGZIP(), []int{5} 314 } 315 316 func (x *SumResponse) GetR() int64 { 317 if x != nil { 318 return x.R 319 } 320 return 0 321 } 322 323 var File_proto_kv_proto protoreflect.FileDescriptor 324 325 var file_proto_kv_proto_rawDesc = []byte{ 326 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6b, 0x76, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 327 0x12, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1e, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 328 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 329 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x23, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 330 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 331 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x53, 0x0a, 0x0a, 332 0x50, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x64, 333 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 334 0x61, 0x64, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 335 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 336 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 337 0x65, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x28, 0x0a, 0x0a, 0x53, 0x75, 338 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0c, 0x0a, 0x01, 0x61, 0x18, 0x01, 0x20, 339 0x01, 0x28, 0x03, 0x52, 0x01, 0x61, 0x12, 0x0c, 0x0a, 0x01, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 340 0x03, 0x52, 0x01, 0x62, 0x22, 0x1b, 0x0a, 0x0b, 0x53, 0x75, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 341 0x6e, 0x73, 0x65, 0x12, 0x0c, 0x0a, 0x01, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x01, 342 0x72, 0x32, 0x5f, 0x0a, 0x07, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x03, 343 0x47, 0x65, 0x74, 0x12, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x52, 344 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 345 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x03, 0x50, 0x75, 346 0x74, 0x12, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x74, 0x52, 0x65, 0x71, 347 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6d, 0x70, 348 0x74, 0x79, 0x32, 0x39, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x48, 0x65, 0x6c, 0x70, 0x65, 0x72, 0x12, 349 0x2c, 0x0a, 0x03, 0x53, 0x75, 0x6d, 0x12, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 350 0x75, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 351 0x6f, 0x2e, 0x53, 0x75, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x09, 0x5a, 352 0x07, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 353 } 354 355 var ( 356 file_proto_kv_proto_rawDescOnce sync.Once 357 file_proto_kv_proto_rawDescData = file_proto_kv_proto_rawDesc 358 ) 359 360 func file_proto_kv_proto_rawDescGZIP() []byte { 361 file_proto_kv_proto_rawDescOnce.Do(func() { 362 file_proto_kv_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_kv_proto_rawDescData) 363 }) 364 return file_proto_kv_proto_rawDescData 365 } 366 367 var file_proto_kv_proto_msgTypes = make([]protoimpl.MessageInfo, 6) 368 var file_proto_kv_proto_goTypes = []interface{}{ 369 (*GetRequest)(nil), // 0: proto.GetRequest 370 (*GetResponse)(nil), // 1: proto.GetResponse 371 (*PutRequest)(nil), // 2: proto.PutRequest 372 (*Empty)(nil), // 3: proto.Empty 373 (*SumRequest)(nil), // 4: proto.SumRequest 374 (*SumResponse)(nil), // 5: proto.SumResponse 375 } 376 var file_proto_kv_proto_depIdxs = []int32{ 377 0, // 0: proto.Counter.Get:input_type -> proto.GetRequest 378 2, // 1: proto.Counter.Put:input_type -> proto.PutRequest 379 4, // 2: proto.AddHelper.Sum:input_type -> proto.SumRequest 380 1, // 3: proto.Counter.Get:output_type -> proto.GetResponse 381 3, // 4: proto.Counter.Put:output_type -> proto.Empty 382 5, // 5: proto.AddHelper.Sum:output_type -> proto.SumResponse 383 3, // [3:6] is the sub-list for method output_type 384 0, // [0:3] is the sub-list for method input_type 385 0, // [0:0] is the sub-list for extension type_name 386 0, // [0:0] is the sub-list for extension extendee 387 0, // [0:0] is the sub-list for field type_name 388 } 389 390 func init() { file_proto_kv_proto_init() } 391 func file_proto_kv_proto_init() { 392 if File_proto_kv_proto != nil { 393 return 394 } 395 if !protoimpl.UnsafeEnabled { 396 file_proto_kv_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 397 switch v := v.(*GetRequest); i { 398 case 0: 399 return &v.state 400 case 1: 401 return &v.sizeCache 402 case 2: 403 return &v.unknownFields 404 default: 405 return nil 406 } 407 } 408 file_proto_kv_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 409 switch v := v.(*GetResponse); i { 410 case 0: 411 return &v.state 412 case 1: 413 return &v.sizeCache 414 case 2: 415 return &v.unknownFields 416 default: 417 return nil 418 } 419 } 420 file_proto_kv_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 421 switch v := v.(*PutRequest); i { 422 case 0: 423 return &v.state 424 case 1: 425 return &v.sizeCache 426 case 2: 427 return &v.unknownFields 428 default: 429 return nil 430 } 431 } 432 file_proto_kv_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { 433 switch v := v.(*Empty); i { 434 case 0: 435 return &v.state 436 case 1: 437 return &v.sizeCache 438 case 2: 439 return &v.unknownFields 440 default: 441 return nil 442 } 443 } 444 file_proto_kv_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { 445 switch v := v.(*SumRequest); i { 446 case 0: 447 return &v.state 448 case 1: 449 return &v.sizeCache 450 case 2: 451 return &v.unknownFields 452 default: 453 return nil 454 } 455 } 456 file_proto_kv_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { 457 switch v := v.(*SumResponse); i { 458 case 0: 459 return &v.state 460 case 1: 461 return &v.sizeCache 462 case 2: 463 return &v.unknownFields 464 default: 465 return nil 466 } 467 } 468 } 469 type x struct{} 470 out := protoimpl.TypeBuilder{ 471 File: protoimpl.DescBuilder{ 472 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 473 RawDescriptor: file_proto_kv_proto_rawDesc, 474 NumEnums: 0, 475 NumMessages: 6, 476 NumExtensions: 0, 477 NumServices: 2, 478 }, 479 GoTypes: file_proto_kv_proto_goTypes, 480 DependencyIndexes: file_proto_kv_proto_depIdxs, 481 MessageInfos: file_proto_kv_proto_msgTypes, 482 }.Build() 483 File_proto_kv_proto = out.File 484 file_proto_kv_proto_rawDesc = nil 485 file_proto_kv_proto_goTypes = nil 486 file_proto_kv_proto_depIdxs = nil 487 }