github.com/ethersphere/bee/v2@v2.2.0/pkg/pingpong/pb/pingpong.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: pingpong.proto 3 4 package pb 5 6 import ( 7 fmt "fmt" 8 proto "github.com/gogo/protobuf/proto" 9 io "io" 10 math "math" 11 math_bits "math/bits" 12 ) 13 14 // Reference imports to suppress errors if they are not otherwise used. 15 var _ = proto.Marshal 16 var _ = fmt.Errorf 17 var _ = math.Inf 18 19 // This is a compile-time assertion to ensure that this generated file 20 // is compatible with the proto package it is being compiled against. 21 // A compilation error at this line likely means your copy of the 22 // proto package needs to be updated. 23 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 24 25 type Ping struct { 26 Greeting string `protobuf:"bytes,1,opt,name=Greeting,proto3" json:"Greeting,omitempty"` 27 } 28 29 func (m *Ping) Reset() { *m = Ping{} } 30 func (m *Ping) String() string { return proto.CompactTextString(m) } 31 func (*Ping) ProtoMessage() {} 32 func (*Ping) Descriptor() ([]byte, []int) { 33 return fileDescriptor_1cfbf639ab46154b, []int{0} 34 } 35 func (m *Ping) XXX_Unmarshal(b []byte) error { 36 return m.Unmarshal(b) 37 } 38 func (m *Ping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 39 if deterministic { 40 return xxx_messageInfo_Ping.Marshal(b, m, deterministic) 41 } else { 42 b = b[:cap(b)] 43 n, err := m.MarshalToSizedBuffer(b) 44 if err != nil { 45 return nil, err 46 } 47 return b[:n], nil 48 } 49 } 50 func (m *Ping) XXX_Merge(src proto.Message) { 51 xxx_messageInfo_Ping.Merge(m, src) 52 } 53 func (m *Ping) XXX_Size() int { 54 return m.Size() 55 } 56 func (m *Ping) XXX_DiscardUnknown() { 57 xxx_messageInfo_Ping.DiscardUnknown(m) 58 } 59 60 var xxx_messageInfo_Ping proto.InternalMessageInfo 61 62 func (m *Ping) GetGreeting() string { 63 if m != nil { 64 return m.Greeting 65 } 66 return "" 67 } 68 69 type Pong struct { 70 Response string `protobuf:"bytes,1,opt,name=Response,proto3" json:"Response,omitempty"` 71 } 72 73 func (m *Pong) Reset() { *m = Pong{} } 74 func (m *Pong) String() string { return proto.CompactTextString(m) } 75 func (*Pong) ProtoMessage() {} 76 func (*Pong) Descriptor() ([]byte, []int) { 77 return fileDescriptor_1cfbf639ab46154b, []int{1} 78 } 79 func (m *Pong) XXX_Unmarshal(b []byte) error { 80 return m.Unmarshal(b) 81 } 82 func (m *Pong) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 83 if deterministic { 84 return xxx_messageInfo_Pong.Marshal(b, m, deterministic) 85 } else { 86 b = b[:cap(b)] 87 n, err := m.MarshalToSizedBuffer(b) 88 if err != nil { 89 return nil, err 90 } 91 return b[:n], nil 92 } 93 } 94 func (m *Pong) XXX_Merge(src proto.Message) { 95 xxx_messageInfo_Pong.Merge(m, src) 96 } 97 func (m *Pong) XXX_Size() int { 98 return m.Size() 99 } 100 func (m *Pong) XXX_DiscardUnknown() { 101 xxx_messageInfo_Pong.DiscardUnknown(m) 102 } 103 104 var xxx_messageInfo_Pong proto.InternalMessageInfo 105 106 func (m *Pong) GetResponse() string { 107 if m != nil { 108 return m.Response 109 } 110 return "" 111 } 112 113 func init() { 114 proto.RegisterType((*Ping)(nil), "pingpong.Ping") 115 proto.RegisterType((*Pong)(nil), "pingpong.Pong") 116 } 117 118 func init() { proto.RegisterFile("pingpong.proto", fileDescriptor_1cfbf639ab46154b) } 119 120 var fileDescriptor_1cfbf639ab46154b = []byte{ 121 // 126 bytes of a gzipped FileDescriptorProto 122 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2b, 0xc8, 0xcc, 0x4b, 123 0x2f, 0xc8, 0xcf, 0x4b, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0x95, 0x94, 124 0xb8, 0x58, 0x02, 0x32, 0xf3, 0xd2, 0x85, 0xa4, 0xb8, 0x38, 0xdc, 0x8b, 0x52, 0x53, 0x4b, 0x32, 125 0xf3, 0xd2, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0xe0, 0x7c, 0xb0, 0x9a, 0x7c, 0x88, 0x9a, 126 0xa0, 0xd4, 0xe2, 0x82, 0xfc, 0xbc, 0xe2, 0x54, 0x98, 0x1a, 0x18, 0xdf, 0x49, 0xe6, 0xc4, 0x23, 127 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 128 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x98, 0x0a, 0x92, 0x92, 0xd8, 0xc0, 0xd6, 0x1a, 129 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x08, 0xee, 0x5c, 0x58, 0x88, 0x00, 0x00, 0x00, 130 } 131 132 func (m *Ping) Marshal() (dAtA []byte, err error) { 133 size := m.Size() 134 dAtA = make([]byte, size) 135 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 136 if err != nil { 137 return nil, err 138 } 139 return dAtA[:n], nil 140 } 141 142 func (m *Ping) MarshalTo(dAtA []byte) (int, error) { 143 size := m.Size() 144 return m.MarshalToSizedBuffer(dAtA[:size]) 145 } 146 147 func (m *Ping) MarshalToSizedBuffer(dAtA []byte) (int, error) { 148 i := len(dAtA) 149 _ = i 150 var l int 151 _ = l 152 if len(m.Greeting) > 0 { 153 i -= len(m.Greeting) 154 copy(dAtA[i:], m.Greeting) 155 i = encodeVarintPingpong(dAtA, i, uint64(len(m.Greeting))) 156 i-- 157 dAtA[i] = 0xa 158 } 159 return len(dAtA) - i, nil 160 } 161 162 func (m *Pong) Marshal() (dAtA []byte, err error) { 163 size := m.Size() 164 dAtA = make([]byte, size) 165 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 166 if err != nil { 167 return nil, err 168 } 169 return dAtA[:n], nil 170 } 171 172 func (m *Pong) MarshalTo(dAtA []byte) (int, error) { 173 size := m.Size() 174 return m.MarshalToSizedBuffer(dAtA[:size]) 175 } 176 177 func (m *Pong) MarshalToSizedBuffer(dAtA []byte) (int, error) { 178 i := len(dAtA) 179 _ = i 180 var l int 181 _ = l 182 if len(m.Response) > 0 { 183 i -= len(m.Response) 184 copy(dAtA[i:], m.Response) 185 i = encodeVarintPingpong(dAtA, i, uint64(len(m.Response))) 186 i-- 187 dAtA[i] = 0xa 188 } 189 return len(dAtA) - i, nil 190 } 191 192 func encodeVarintPingpong(dAtA []byte, offset int, v uint64) int { 193 offset -= sovPingpong(v) 194 base := offset 195 for v >= 1<<7 { 196 dAtA[offset] = uint8(v&0x7f | 0x80) 197 v >>= 7 198 offset++ 199 } 200 dAtA[offset] = uint8(v) 201 return base 202 } 203 func (m *Ping) Size() (n int) { 204 if m == nil { 205 return 0 206 } 207 var l int 208 _ = l 209 l = len(m.Greeting) 210 if l > 0 { 211 n += 1 + l + sovPingpong(uint64(l)) 212 } 213 return n 214 } 215 216 func (m *Pong) Size() (n int) { 217 if m == nil { 218 return 0 219 } 220 var l int 221 _ = l 222 l = len(m.Response) 223 if l > 0 { 224 n += 1 + l + sovPingpong(uint64(l)) 225 } 226 return n 227 } 228 229 func sovPingpong(x uint64) (n int) { 230 return (math_bits.Len64(x|1) + 6) / 7 231 } 232 func sozPingpong(x uint64) (n int) { 233 return sovPingpong(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 234 } 235 func (m *Ping) Unmarshal(dAtA []byte) error { 236 l := len(dAtA) 237 iNdEx := 0 238 for iNdEx < l { 239 preIndex := iNdEx 240 var wire uint64 241 for shift := uint(0); ; shift += 7 { 242 if shift >= 64 { 243 return ErrIntOverflowPingpong 244 } 245 if iNdEx >= l { 246 return io.ErrUnexpectedEOF 247 } 248 b := dAtA[iNdEx] 249 iNdEx++ 250 wire |= uint64(b&0x7F) << shift 251 if b < 0x80 { 252 break 253 } 254 } 255 fieldNum := int32(wire >> 3) 256 wireType := int(wire & 0x7) 257 if wireType == 4 { 258 return fmt.Errorf("proto: Ping: wiretype end group for non-group") 259 } 260 if fieldNum <= 0 { 261 return fmt.Errorf("proto: Ping: illegal tag %d (wire type %d)", fieldNum, wire) 262 } 263 switch fieldNum { 264 case 1: 265 if wireType != 2 { 266 return fmt.Errorf("proto: wrong wireType = %d for field Greeting", wireType) 267 } 268 var stringLen uint64 269 for shift := uint(0); ; shift += 7 { 270 if shift >= 64 { 271 return ErrIntOverflowPingpong 272 } 273 if iNdEx >= l { 274 return io.ErrUnexpectedEOF 275 } 276 b := dAtA[iNdEx] 277 iNdEx++ 278 stringLen |= uint64(b&0x7F) << shift 279 if b < 0x80 { 280 break 281 } 282 } 283 intStringLen := int(stringLen) 284 if intStringLen < 0 { 285 return ErrInvalidLengthPingpong 286 } 287 postIndex := iNdEx + intStringLen 288 if postIndex < 0 { 289 return ErrInvalidLengthPingpong 290 } 291 if postIndex > l { 292 return io.ErrUnexpectedEOF 293 } 294 m.Greeting = string(dAtA[iNdEx:postIndex]) 295 iNdEx = postIndex 296 default: 297 iNdEx = preIndex 298 skippy, err := skipPingpong(dAtA[iNdEx:]) 299 if err != nil { 300 return err 301 } 302 if skippy < 0 { 303 return ErrInvalidLengthPingpong 304 } 305 if (iNdEx + skippy) < 0 { 306 return ErrInvalidLengthPingpong 307 } 308 if (iNdEx + skippy) > l { 309 return io.ErrUnexpectedEOF 310 } 311 iNdEx += skippy 312 } 313 } 314 315 if iNdEx > l { 316 return io.ErrUnexpectedEOF 317 } 318 return nil 319 } 320 func (m *Pong) Unmarshal(dAtA []byte) error { 321 l := len(dAtA) 322 iNdEx := 0 323 for iNdEx < l { 324 preIndex := iNdEx 325 var wire uint64 326 for shift := uint(0); ; shift += 7 { 327 if shift >= 64 { 328 return ErrIntOverflowPingpong 329 } 330 if iNdEx >= l { 331 return io.ErrUnexpectedEOF 332 } 333 b := dAtA[iNdEx] 334 iNdEx++ 335 wire |= uint64(b&0x7F) << shift 336 if b < 0x80 { 337 break 338 } 339 } 340 fieldNum := int32(wire >> 3) 341 wireType := int(wire & 0x7) 342 if wireType == 4 { 343 return fmt.Errorf("proto: Pong: wiretype end group for non-group") 344 } 345 if fieldNum <= 0 { 346 return fmt.Errorf("proto: Pong: illegal tag %d (wire type %d)", fieldNum, wire) 347 } 348 switch fieldNum { 349 case 1: 350 if wireType != 2 { 351 return fmt.Errorf("proto: wrong wireType = %d for field Response", wireType) 352 } 353 var stringLen uint64 354 for shift := uint(0); ; shift += 7 { 355 if shift >= 64 { 356 return ErrIntOverflowPingpong 357 } 358 if iNdEx >= l { 359 return io.ErrUnexpectedEOF 360 } 361 b := dAtA[iNdEx] 362 iNdEx++ 363 stringLen |= uint64(b&0x7F) << shift 364 if b < 0x80 { 365 break 366 } 367 } 368 intStringLen := int(stringLen) 369 if intStringLen < 0 { 370 return ErrInvalidLengthPingpong 371 } 372 postIndex := iNdEx + intStringLen 373 if postIndex < 0 { 374 return ErrInvalidLengthPingpong 375 } 376 if postIndex > l { 377 return io.ErrUnexpectedEOF 378 } 379 m.Response = string(dAtA[iNdEx:postIndex]) 380 iNdEx = postIndex 381 default: 382 iNdEx = preIndex 383 skippy, err := skipPingpong(dAtA[iNdEx:]) 384 if err != nil { 385 return err 386 } 387 if skippy < 0 { 388 return ErrInvalidLengthPingpong 389 } 390 if (iNdEx + skippy) < 0 { 391 return ErrInvalidLengthPingpong 392 } 393 if (iNdEx + skippy) > l { 394 return io.ErrUnexpectedEOF 395 } 396 iNdEx += skippy 397 } 398 } 399 400 if iNdEx > l { 401 return io.ErrUnexpectedEOF 402 } 403 return nil 404 } 405 func skipPingpong(dAtA []byte) (n int, err error) { 406 l := len(dAtA) 407 iNdEx := 0 408 depth := 0 409 for iNdEx < l { 410 var wire uint64 411 for shift := uint(0); ; shift += 7 { 412 if shift >= 64 { 413 return 0, ErrIntOverflowPingpong 414 } 415 if iNdEx >= l { 416 return 0, io.ErrUnexpectedEOF 417 } 418 b := dAtA[iNdEx] 419 iNdEx++ 420 wire |= (uint64(b) & 0x7F) << shift 421 if b < 0x80 { 422 break 423 } 424 } 425 wireType := int(wire & 0x7) 426 switch wireType { 427 case 0: 428 for shift := uint(0); ; shift += 7 { 429 if shift >= 64 { 430 return 0, ErrIntOverflowPingpong 431 } 432 if iNdEx >= l { 433 return 0, io.ErrUnexpectedEOF 434 } 435 iNdEx++ 436 if dAtA[iNdEx-1] < 0x80 { 437 break 438 } 439 } 440 case 1: 441 iNdEx += 8 442 case 2: 443 var length int 444 for shift := uint(0); ; shift += 7 { 445 if shift >= 64 { 446 return 0, ErrIntOverflowPingpong 447 } 448 if iNdEx >= l { 449 return 0, io.ErrUnexpectedEOF 450 } 451 b := dAtA[iNdEx] 452 iNdEx++ 453 length |= (int(b) & 0x7F) << shift 454 if b < 0x80 { 455 break 456 } 457 } 458 if length < 0 { 459 return 0, ErrInvalidLengthPingpong 460 } 461 iNdEx += length 462 case 3: 463 depth++ 464 case 4: 465 if depth == 0 { 466 return 0, ErrUnexpectedEndOfGroupPingpong 467 } 468 depth-- 469 case 5: 470 iNdEx += 4 471 default: 472 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 473 } 474 if iNdEx < 0 { 475 return 0, ErrInvalidLengthPingpong 476 } 477 if depth == 0 { 478 return iNdEx, nil 479 } 480 } 481 return 0, io.ErrUnexpectedEOF 482 } 483 484 var ( 485 ErrInvalidLengthPingpong = fmt.Errorf("proto: negative length found during unmarshaling") 486 ErrIntOverflowPingpong = fmt.Errorf("proto: integer overflow") 487 ErrUnexpectedEndOfGroupPingpong = fmt.Errorf("proto: unexpected end of group") 488 )