github.com/cosmos/cosmos-sdk@v0.50.10/testutil/testdata/tx.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: testpb/tx.proto 3 4 package testdata 5 6 import ( 7 context "context" 8 fmt "fmt" 9 _ "github.com/cosmos/cosmos-sdk/types/msgservice" 10 _ "github.com/cosmos/cosmos-sdk/types/tx/amino" 11 _ "github.com/cosmos/gogoproto/gogoproto" 12 grpc1 "github.com/cosmos/gogoproto/grpc" 13 proto "github.com/cosmos/gogoproto/proto" 14 grpc "google.golang.org/grpc" 15 codes "google.golang.org/grpc/codes" 16 status "google.golang.org/grpc/status" 17 io "io" 18 math "math" 19 math_bits "math/bits" 20 ) 21 22 // Reference imports to suppress errors if they are not otherwise used. 23 var _ = proto.Marshal 24 var _ = fmt.Errorf 25 var _ = math.Inf 26 27 // This is a compile-time assertion to ensure that this generated file 28 // is compatible with the proto package it is being compiled against. 29 // A compilation error at this line likely means your copy of the 30 // proto package needs to be updated. 31 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 32 33 type MsgCreateDog struct { 34 Dog *Dog `protobuf:"bytes,1,opt,name=dog,proto3" json:"dog,omitempty"` 35 Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` 36 } 37 38 func (m *MsgCreateDog) Reset() { *m = MsgCreateDog{} } 39 func (m *MsgCreateDog) String() string { return proto.CompactTextString(m) } 40 func (*MsgCreateDog) ProtoMessage() {} 41 func (*MsgCreateDog) Descriptor() ([]byte, []int) { 42 return fileDescriptor_1c54006dba274b2e, []int{0} 43 } 44 func (m *MsgCreateDog) XXX_Unmarshal(b []byte) error { 45 return m.Unmarshal(b) 46 } 47 func (m *MsgCreateDog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 48 if deterministic { 49 return xxx_messageInfo_MsgCreateDog.Marshal(b, m, deterministic) 50 } else { 51 b = b[:cap(b)] 52 n, err := m.MarshalToSizedBuffer(b) 53 if err != nil { 54 return nil, err 55 } 56 return b[:n], nil 57 } 58 } 59 func (m *MsgCreateDog) XXX_Merge(src proto.Message) { 60 xxx_messageInfo_MsgCreateDog.Merge(m, src) 61 } 62 func (m *MsgCreateDog) XXX_Size() int { 63 return m.Size() 64 } 65 func (m *MsgCreateDog) XXX_DiscardUnknown() { 66 xxx_messageInfo_MsgCreateDog.DiscardUnknown(m) 67 } 68 69 var xxx_messageInfo_MsgCreateDog proto.InternalMessageInfo 70 71 func (m *MsgCreateDog) GetDog() *Dog { 72 if m != nil { 73 return m.Dog 74 } 75 return nil 76 } 77 78 func (m *MsgCreateDog) GetOwner() string { 79 if m != nil { 80 return m.Owner 81 } 82 return "" 83 } 84 85 type MsgCreateDogResponse struct { 86 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 87 } 88 89 func (m *MsgCreateDogResponse) Reset() { *m = MsgCreateDogResponse{} } 90 func (m *MsgCreateDogResponse) String() string { return proto.CompactTextString(m) } 91 func (*MsgCreateDogResponse) ProtoMessage() {} 92 func (*MsgCreateDogResponse) Descriptor() ([]byte, []int) { 93 return fileDescriptor_1c54006dba274b2e, []int{1} 94 } 95 func (m *MsgCreateDogResponse) XXX_Unmarshal(b []byte) error { 96 return m.Unmarshal(b) 97 } 98 func (m *MsgCreateDogResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 99 if deterministic { 100 return xxx_messageInfo_MsgCreateDogResponse.Marshal(b, m, deterministic) 101 } else { 102 b = b[:cap(b)] 103 n, err := m.MarshalToSizedBuffer(b) 104 if err != nil { 105 return nil, err 106 } 107 return b[:n], nil 108 } 109 } 110 func (m *MsgCreateDogResponse) XXX_Merge(src proto.Message) { 111 xxx_messageInfo_MsgCreateDogResponse.Merge(m, src) 112 } 113 func (m *MsgCreateDogResponse) XXX_Size() int { 114 return m.Size() 115 } 116 func (m *MsgCreateDogResponse) XXX_DiscardUnknown() { 117 xxx_messageInfo_MsgCreateDogResponse.DiscardUnknown(m) 118 } 119 120 var xxx_messageInfo_MsgCreateDogResponse proto.InternalMessageInfo 121 122 func (m *MsgCreateDogResponse) GetName() string { 123 if m != nil { 124 return m.Name 125 } 126 return "" 127 } 128 129 // TestMsg is msg type for testing protobuf message using any, as defined in 130 // https://github.com/cosmos/cosmos-sdk/issues/6213. 131 type TestMsg struct { 132 Signers []string `protobuf:"bytes,1,rep,name=signers,proto3" json:"signers,omitempty"` 133 } 134 135 func (m *TestMsg) Reset() { *m = TestMsg{} } 136 func (m *TestMsg) String() string { return proto.CompactTextString(m) } 137 func (*TestMsg) ProtoMessage() {} 138 func (*TestMsg) Descriptor() ([]byte, []int) { 139 return fileDescriptor_1c54006dba274b2e, []int{2} 140 } 141 func (m *TestMsg) XXX_Unmarshal(b []byte) error { 142 return m.Unmarshal(b) 143 } 144 func (m *TestMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 145 if deterministic { 146 return xxx_messageInfo_TestMsg.Marshal(b, m, deterministic) 147 } else { 148 b = b[:cap(b)] 149 n, err := m.MarshalToSizedBuffer(b) 150 if err != nil { 151 return nil, err 152 } 153 return b[:n], nil 154 } 155 } 156 func (m *TestMsg) XXX_Merge(src proto.Message) { 157 xxx_messageInfo_TestMsg.Merge(m, src) 158 } 159 func (m *TestMsg) XXX_Size() int { 160 return m.Size() 161 } 162 func (m *TestMsg) XXX_DiscardUnknown() { 163 xxx_messageInfo_TestMsg.DiscardUnknown(m) 164 } 165 166 var xxx_messageInfo_TestMsg proto.InternalMessageInfo 167 168 func init() { 169 proto.RegisterType((*MsgCreateDog)(nil), "testpb.MsgCreateDog") 170 proto.RegisterType((*MsgCreateDogResponse)(nil), "testpb.MsgCreateDogResponse") 171 proto.RegisterType((*TestMsg)(nil), "testpb.TestMsg") 172 } 173 174 func init() { proto.RegisterFile("testpb/tx.proto", fileDescriptor_1c54006dba274b2e) } 175 176 var fileDescriptor_1c54006dba274b2e = []byte{ 177 // 337 bytes of a gzipped FileDescriptorProto 178 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0x31, 0x4b, 0xc3, 0x40, 179 0x14, 0xc7, 0x73, 0xd6, 0xb6, 0xe4, 0x2a, 0x8a, 0x21, 0x62, 0x08, 0x1a, 0x4b, 0x5d, 0x4a, 0xc0, 180 0x1c, 0xd6, 0xad, 0x8b, 0xa0, 0x1d, 0xba, 0x14, 0x21, 0x38, 0xb9, 0xa5, 0xed, 0x71, 0x06, 0x4d, 181 0x5e, 0xc9, 0xbb, 0xaa, 0xa3, 0x38, 0x89, 0x93, 0x1f, 0xc1, 0x8f, 0xd0, 0x8f, 0xe1, 0xd8, 0xd1, 182 0x51, 0xda, 0xa1, 0x5f, 0x43, 0x72, 0x97, 0x68, 0x07, 0x97, 0xbc, 0xff, 0xfb, 0x3d, 0xf2, 0xbf, 183 0xf7, 0xfe, 0x74, 0x47, 0x72, 0x94, 0x93, 0x21, 0x93, 0x4f, 0xc1, 0x24, 0x03, 0x09, 0x56, 0x4d, 184 0x03, 0x77, 0x37, 0x4a, 0xe2, 0x14, 0x98, 0xfa, 0xea, 0x91, 0x6b, 0x0b, 0x10, 0xa0, 0x24, 0xcb, 185 0x55, 0x41, 0xf7, 0x4a, 0x07, 0x8e, 0x72, 0x1c, 0xc9, 0xa8, 0xc0, 0xfb, 0x23, 0xc0, 0x04, 0x90, 186 0x25, 0x28, 0xd8, 0xc3, 0x69, 0x5e, 0xf4, 0xa0, 0x75, 0x45, 0xb7, 0x06, 0x28, 0x2e, 0x33, 0x1e, 187 0x49, 0xde, 0x03, 0x61, 0x1d, 0xd2, 0xca, 0x18, 0x84, 0x43, 0x9a, 0xa4, 0xdd, 0xe8, 0x34, 0x02, 188 0xed, 0x16, 0xf4, 0x40, 0x84, 0x39, 0xb7, 0x6c, 0x5a, 0x85, 0xc7, 0x94, 0x67, 0xce, 0x46, 0x93, 189 0xb4, 0xcd, 0x50, 0x37, 0x5d, 0xfa, 0xb2, 0x9a, 0xf9, 0x5a, 0xb7, 0x7c, 0x6a, 0xaf, 0x1b, 0x86, 190 0x1c, 0x27, 0x90, 0x22, 0xb7, 0x2c, 0xba, 0x99, 0x46, 0x09, 0x57, 0xce, 0x66, 0xa8, 0x74, 0xab, 191 0x4f, 0xeb, 0xd7, 0x1c, 0xe5, 0x00, 0x85, 0xe5, 0xd0, 0x3a, 0xc6, 0x22, 0xe5, 0x19, 0x3a, 0xa4, 192 0x59, 0x69, 0x9b, 0x61, 0xd9, 0x76, 0x8f, 0x5f, 0x3f, 0x8e, 0x8c, 0xfc, 0x81, 0x92, 0xbc, 0xad, 193 0x66, 0xfe, 0x76, 0x71, 0x66, 0xf1, 0x7b, 0x67, 0x40, 0x2b, 0xb9, 0xcb, 0x39, 0x35, 0xff, 0x4e, 194 0xb1, 0xcb, 0xed, 0xd7, 0xf7, 0x71, 0x0f, 0xfe, 0xa3, 0xe5, 0x96, 0x6e, 0xf5, 0x79, 0x35, 0xf3, 195 0xc9, 0x45, 0xff, 0x73, 0xe1, 0x91, 0xf9, 0xc2, 0x23, 0xdf, 0x0b, 0x8f, 0xbc, 0x2f, 0x3d, 0x63, 196 0xbe, 0xf4, 0x8c, 0xaf, 0xa5, 0x67, 0xdc, 0x04, 0x22, 0x96, 0xb7, 0xd3, 0x61, 0x30, 0x82, 0x84, 197 0x15, 0x99, 0xea, 0x72, 0x82, 0xe3, 0x3b, 0x95, 0xfa, 0x54, 0xc6, 0xf7, 0xbf, 0xf1, 0x0f, 0x6b, 198 0x2a, 0xe6, 0xb3, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x89, 0xf1, 0xc8, 0x3c, 0xda, 0x01, 0x00, 199 0x00, 200 } 201 202 // Reference imports to suppress errors if they are not otherwise used. 203 var _ context.Context 204 var _ grpc.ClientConn 205 206 // This is a compile-time assertion to ensure that this generated file 207 // is compatible with the grpc package it is being compiled against. 208 const _ = grpc.SupportPackageIsVersion4 209 210 // MsgClient is the client API for Msg service. 211 // 212 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 213 type MsgClient interface { 214 CreateDog(ctx context.Context, in *MsgCreateDog, opts ...grpc.CallOption) (*MsgCreateDogResponse, error) 215 } 216 217 type msgClient struct { 218 cc grpc1.ClientConn 219 } 220 221 func NewMsgClient(cc grpc1.ClientConn) MsgClient { 222 return &msgClient{cc} 223 } 224 225 func (c *msgClient) CreateDog(ctx context.Context, in *MsgCreateDog, opts ...grpc.CallOption) (*MsgCreateDogResponse, error) { 226 out := new(MsgCreateDogResponse) 227 err := c.cc.Invoke(ctx, "/testpb.Msg/CreateDog", in, out, opts...) 228 if err != nil { 229 return nil, err 230 } 231 return out, nil 232 } 233 234 // MsgServer is the server API for Msg service. 235 type MsgServer interface { 236 CreateDog(context.Context, *MsgCreateDog) (*MsgCreateDogResponse, error) 237 } 238 239 // UnimplementedMsgServer can be embedded to have forward compatible implementations. 240 type UnimplementedMsgServer struct { 241 } 242 243 func (*UnimplementedMsgServer) CreateDog(ctx context.Context, req *MsgCreateDog) (*MsgCreateDogResponse, error) { 244 return nil, status.Errorf(codes.Unimplemented, "method CreateDog not implemented") 245 } 246 247 func RegisterMsgServer(s grpc1.Server, srv MsgServer) { 248 s.RegisterService(&_Msg_serviceDesc, srv) 249 } 250 251 func _Msg_CreateDog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 252 in := new(MsgCreateDog) 253 if err := dec(in); err != nil { 254 return nil, err 255 } 256 if interceptor == nil { 257 return srv.(MsgServer).CreateDog(ctx, in) 258 } 259 info := &grpc.UnaryServerInfo{ 260 Server: srv, 261 FullMethod: "/testpb.Msg/CreateDog", 262 } 263 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 264 return srv.(MsgServer).CreateDog(ctx, req.(*MsgCreateDog)) 265 } 266 return interceptor(ctx, in, info, handler) 267 } 268 269 var _Msg_serviceDesc = grpc.ServiceDesc{ 270 ServiceName: "testpb.Msg", 271 HandlerType: (*MsgServer)(nil), 272 Methods: []grpc.MethodDesc{ 273 { 274 MethodName: "CreateDog", 275 Handler: _Msg_CreateDog_Handler, 276 }, 277 }, 278 Streams: []grpc.StreamDesc{}, 279 Metadata: "testpb/tx.proto", 280 } 281 282 func (m *MsgCreateDog) Marshal() (dAtA []byte, err error) { 283 size := m.Size() 284 dAtA = make([]byte, size) 285 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 286 if err != nil { 287 return nil, err 288 } 289 return dAtA[:n], nil 290 } 291 292 func (m *MsgCreateDog) MarshalTo(dAtA []byte) (int, error) { 293 size := m.Size() 294 return m.MarshalToSizedBuffer(dAtA[:size]) 295 } 296 297 func (m *MsgCreateDog) MarshalToSizedBuffer(dAtA []byte) (int, error) { 298 i := len(dAtA) 299 _ = i 300 var l int 301 _ = l 302 if len(m.Owner) > 0 { 303 i -= len(m.Owner) 304 copy(dAtA[i:], m.Owner) 305 i = encodeVarintTx(dAtA, i, uint64(len(m.Owner))) 306 i-- 307 dAtA[i] = 0x12 308 } 309 if m.Dog != nil { 310 { 311 size, err := m.Dog.MarshalToSizedBuffer(dAtA[:i]) 312 if err != nil { 313 return 0, err 314 } 315 i -= size 316 i = encodeVarintTx(dAtA, i, uint64(size)) 317 } 318 i-- 319 dAtA[i] = 0xa 320 } 321 return len(dAtA) - i, nil 322 } 323 324 func (m *MsgCreateDogResponse) Marshal() (dAtA []byte, err error) { 325 size := m.Size() 326 dAtA = make([]byte, size) 327 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 328 if err != nil { 329 return nil, err 330 } 331 return dAtA[:n], nil 332 } 333 334 func (m *MsgCreateDogResponse) MarshalTo(dAtA []byte) (int, error) { 335 size := m.Size() 336 return m.MarshalToSizedBuffer(dAtA[:size]) 337 } 338 339 func (m *MsgCreateDogResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 340 i := len(dAtA) 341 _ = i 342 var l int 343 _ = l 344 if len(m.Name) > 0 { 345 i -= len(m.Name) 346 copy(dAtA[i:], m.Name) 347 i = encodeVarintTx(dAtA, i, uint64(len(m.Name))) 348 i-- 349 dAtA[i] = 0xa 350 } 351 return len(dAtA) - i, nil 352 } 353 354 func (m *TestMsg) Marshal() (dAtA []byte, err error) { 355 size := m.Size() 356 dAtA = make([]byte, size) 357 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 358 if err != nil { 359 return nil, err 360 } 361 return dAtA[:n], nil 362 } 363 364 func (m *TestMsg) MarshalTo(dAtA []byte) (int, error) { 365 size := m.Size() 366 return m.MarshalToSizedBuffer(dAtA[:size]) 367 } 368 369 func (m *TestMsg) MarshalToSizedBuffer(dAtA []byte) (int, error) { 370 i := len(dAtA) 371 _ = i 372 var l int 373 _ = l 374 if len(m.Signers) > 0 { 375 for iNdEx := len(m.Signers) - 1; iNdEx >= 0; iNdEx-- { 376 i -= len(m.Signers[iNdEx]) 377 copy(dAtA[i:], m.Signers[iNdEx]) 378 i = encodeVarintTx(dAtA, i, uint64(len(m.Signers[iNdEx]))) 379 i-- 380 dAtA[i] = 0xa 381 } 382 } 383 return len(dAtA) - i, nil 384 } 385 386 func encodeVarintTx(dAtA []byte, offset int, v uint64) int { 387 offset -= sovTx(v) 388 base := offset 389 for v >= 1<<7 { 390 dAtA[offset] = uint8(v&0x7f | 0x80) 391 v >>= 7 392 offset++ 393 } 394 dAtA[offset] = uint8(v) 395 return base 396 } 397 func (m *MsgCreateDog) Size() (n int) { 398 if m == nil { 399 return 0 400 } 401 var l int 402 _ = l 403 if m.Dog != nil { 404 l = m.Dog.Size() 405 n += 1 + l + sovTx(uint64(l)) 406 } 407 l = len(m.Owner) 408 if l > 0 { 409 n += 1 + l + sovTx(uint64(l)) 410 } 411 return n 412 } 413 414 func (m *MsgCreateDogResponse) Size() (n int) { 415 if m == nil { 416 return 0 417 } 418 var l int 419 _ = l 420 l = len(m.Name) 421 if l > 0 { 422 n += 1 + l + sovTx(uint64(l)) 423 } 424 return n 425 } 426 427 func (m *TestMsg) Size() (n int) { 428 if m == nil { 429 return 0 430 } 431 var l int 432 _ = l 433 if len(m.Signers) > 0 { 434 for _, s := range m.Signers { 435 l = len(s) 436 n += 1 + l + sovTx(uint64(l)) 437 } 438 } 439 return n 440 } 441 442 func sovTx(x uint64) (n int) { 443 return (math_bits.Len64(x|1) + 6) / 7 444 } 445 func sozTx(x uint64) (n int) { 446 return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 447 } 448 func (m *MsgCreateDog) Unmarshal(dAtA []byte) error { 449 l := len(dAtA) 450 iNdEx := 0 451 for iNdEx < l { 452 preIndex := iNdEx 453 var wire uint64 454 for shift := uint(0); ; shift += 7 { 455 if shift >= 64 { 456 return ErrIntOverflowTx 457 } 458 if iNdEx >= l { 459 return io.ErrUnexpectedEOF 460 } 461 b := dAtA[iNdEx] 462 iNdEx++ 463 wire |= uint64(b&0x7F) << shift 464 if b < 0x80 { 465 break 466 } 467 } 468 fieldNum := int32(wire >> 3) 469 wireType := int(wire & 0x7) 470 if wireType == 4 { 471 return fmt.Errorf("proto: MsgCreateDog: wiretype end group for non-group") 472 } 473 if fieldNum <= 0 { 474 return fmt.Errorf("proto: MsgCreateDog: illegal tag %d (wire type %d)", fieldNum, wire) 475 } 476 switch fieldNum { 477 case 1: 478 if wireType != 2 { 479 return fmt.Errorf("proto: wrong wireType = %d for field Dog", wireType) 480 } 481 var msglen int 482 for shift := uint(0); ; shift += 7 { 483 if shift >= 64 { 484 return ErrIntOverflowTx 485 } 486 if iNdEx >= l { 487 return io.ErrUnexpectedEOF 488 } 489 b := dAtA[iNdEx] 490 iNdEx++ 491 msglen |= int(b&0x7F) << shift 492 if b < 0x80 { 493 break 494 } 495 } 496 if msglen < 0 { 497 return ErrInvalidLengthTx 498 } 499 postIndex := iNdEx + msglen 500 if postIndex < 0 { 501 return ErrInvalidLengthTx 502 } 503 if postIndex > l { 504 return io.ErrUnexpectedEOF 505 } 506 if m.Dog == nil { 507 m.Dog = &Dog{} 508 } 509 if err := m.Dog.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 510 return err 511 } 512 iNdEx = postIndex 513 case 2: 514 if wireType != 2 { 515 return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) 516 } 517 var stringLen uint64 518 for shift := uint(0); ; shift += 7 { 519 if shift >= 64 { 520 return ErrIntOverflowTx 521 } 522 if iNdEx >= l { 523 return io.ErrUnexpectedEOF 524 } 525 b := dAtA[iNdEx] 526 iNdEx++ 527 stringLen |= uint64(b&0x7F) << shift 528 if b < 0x80 { 529 break 530 } 531 } 532 intStringLen := int(stringLen) 533 if intStringLen < 0 { 534 return ErrInvalidLengthTx 535 } 536 postIndex := iNdEx + intStringLen 537 if postIndex < 0 { 538 return ErrInvalidLengthTx 539 } 540 if postIndex > l { 541 return io.ErrUnexpectedEOF 542 } 543 m.Owner = string(dAtA[iNdEx:postIndex]) 544 iNdEx = postIndex 545 default: 546 iNdEx = preIndex 547 skippy, err := skipTx(dAtA[iNdEx:]) 548 if err != nil { 549 return err 550 } 551 if (skippy < 0) || (iNdEx+skippy) < 0 { 552 return ErrInvalidLengthTx 553 } 554 if (iNdEx + skippy) > l { 555 return io.ErrUnexpectedEOF 556 } 557 iNdEx += skippy 558 } 559 } 560 561 if iNdEx > l { 562 return io.ErrUnexpectedEOF 563 } 564 return nil 565 } 566 func (m *MsgCreateDogResponse) Unmarshal(dAtA []byte) error { 567 l := len(dAtA) 568 iNdEx := 0 569 for iNdEx < l { 570 preIndex := iNdEx 571 var wire uint64 572 for shift := uint(0); ; shift += 7 { 573 if shift >= 64 { 574 return ErrIntOverflowTx 575 } 576 if iNdEx >= l { 577 return io.ErrUnexpectedEOF 578 } 579 b := dAtA[iNdEx] 580 iNdEx++ 581 wire |= uint64(b&0x7F) << shift 582 if b < 0x80 { 583 break 584 } 585 } 586 fieldNum := int32(wire >> 3) 587 wireType := int(wire & 0x7) 588 if wireType == 4 { 589 return fmt.Errorf("proto: MsgCreateDogResponse: wiretype end group for non-group") 590 } 591 if fieldNum <= 0 { 592 return fmt.Errorf("proto: MsgCreateDogResponse: illegal tag %d (wire type %d)", fieldNum, wire) 593 } 594 switch fieldNum { 595 case 1: 596 if wireType != 2 { 597 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 598 } 599 var stringLen uint64 600 for shift := uint(0); ; shift += 7 { 601 if shift >= 64 { 602 return ErrIntOverflowTx 603 } 604 if iNdEx >= l { 605 return io.ErrUnexpectedEOF 606 } 607 b := dAtA[iNdEx] 608 iNdEx++ 609 stringLen |= uint64(b&0x7F) << shift 610 if b < 0x80 { 611 break 612 } 613 } 614 intStringLen := int(stringLen) 615 if intStringLen < 0 { 616 return ErrInvalidLengthTx 617 } 618 postIndex := iNdEx + intStringLen 619 if postIndex < 0 { 620 return ErrInvalidLengthTx 621 } 622 if postIndex > l { 623 return io.ErrUnexpectedEOF 624 } 625 m.Name = string(dAtA[iNdEx:postIndex]) 626 iNdEx = postIndex 627 default: 628 iNdEx = preIndex 629 skippy, err := skipTx(dAtA[iNdEx:]) 630 if err != nil { 631 return err 632 } 633 if (skippy < 0) || (iNdEx+skippy) < 0 { 634 return ErrInvalidLengthTx 635 } 636 if (iNdEx + skippy) > l { 637 return io.ErrUnexpectedEOF 638 } 639 iNdEx += skippy 640 } 641 } 642 643 if iNdEx > l { 644 return io.ErrUnexpectedEOF 645 } 646 return nil 647 } 648 func (m *TestMsg) Unmarshal(dAtA []byte) error { 649 l := len(dAtA) 650 iNdEx := 0 651 for iNdEx < l { 652 preIndex := iNdEx 653 var wire uint64 654 for shift := uint(0); ; shift += 7 { 655 if shift >= 64 { 656 return ErrIntOverflowTx 657 } 658 if iNdEx >= l { 659 return io.ErrUnexpectedEOF 660 } 661 b := dAtA[iNdEx] 662 iNdEx++ 663 wire |= uint64(b&0x7F) << shift 664 if b < 0x80 { 665 break 666 } 667 } 668 fieldNum := int32(wire >> 3) 669 wireType := int(wire & 0x7) 670 if wireType == 4 { 671 return fmt.Errorf("proto: TestMsg: wiretype end group for non-group") 672 } 673 if fieldNum <= 0 { 674 return fmt.Errorf("proto: TestMsg: illegal tag %d (wire type %d)", fieldNum, wire) 675 } 676 switch fieldNum { 677 case 1: 678 if wireType != 2 { 679 return fmt.Errorf("proto: wrong wireType = %d for field Signers", wireType) 680 } 681 var stringLen uint64 682 for shift := uint(0); ; shift += 7 { 683 if shift >= 64 { 684 return ErrIntOverflowTx 685 } 686 if iNdEx >= l { 687 return io.ErrUnexpectedEOF 688 } 689 b := dAtA[iNdEx] 690 iNdEx++ 691 stringLen |= uint64(b&0x7F) << shift 692 if b < 0x80 { 693 break 694 } 695 } 696 intStringLen := int(stringLen) 697 if intStringLen < 0 { 698 return ErrInvalidLengthTx 699 } 700 postIndex := iNdEx + intStringLen 701 if postIndex < 0 { 702 return ErrInvalidLengthTx 703 } 704 if postIndex > l { 705 return io.ErrUnexpectedEOF 706 } 707 m.Signers = append(m.Signers, string(dAtA[iNdEx:postIndex])) 708 iNdEx = postIndex 709 default: 710 iNdEx = preIndex 711 skippy, err := skipTx(dAtA[iNdEx:]) 712 if err != nil { 713 return err 714 } 715 if (skippy < 0) || (iNdEx+skippy) < 0 { 716 return ErrInvalidLengthTx 717 } 718 if (iNdEx + skippy) > l { 719 return io.ErrUnexpectedEOF 720 } 721 iNdEx += skippy 722 } 723 } 724 725 if iNdEx > l { 726 return io.ErrUnexpectedEOF 727 } 728 return nil 729 } 730 func skipTx(dAtA []byte) (n int, err error) { 731 l := len(dAtA) 732 iNdEx := 0 733 depth := 0 734 for iNdEx < l { 735 var wire uint64 736 for shift := uint(0); ; shift += 7 { 737 if shift >= 64 { 738 return 0, ErrIntOverflowTx 739 } 740 if iNdEx >= l { 741 return 0, io.ErrUnexpectedEOF 742 } 743 b := dAtA[iNdEx] 744 iNdEx++ 745 wire |= (uint64(b) & 0x7F) << shift 746 if b < 0x80 { 747 break 748 } 749 } 750 wireType := int(wire & 0x7) 751 switch wireType { 752 case 0: 753 for shift := uint(0); ; shift += 7 { 754 if shift >= 64 { 755 return 0, ErrIntOverflowTx 756 } 757 if iNdEx >= l { 758 return 0, io.ErrUnexpectedEOF 759 } 760 iNdEx++ 761 if dAtA[iNdEx-1] < 0x80 { 762 break 763 } 764 } 765 case 1: 766 iNdEx += 8 767 case 2: 768 var length int 769 for shift := uint(0); ; shift += 7 { 770 if shift >= 64 { 771 return 0, ErrIntOverflowTx 772 } 773 if iNdEx >= l { 774 return 0, io.ErrUnexpectedEOF 775 } 776 b := dAtA[iNdEx] 777 iNdEx++ 778 length |= (int(b) & 0x7F) << shift 779 if b < 0x80 { 780 break 781 } 782 } 783 if length < 0 { 784 return 0, ErrInvalidLengthTx 785 } 786 iNdEx += length 787 case 3: 788 depth++ 789 case 4: 790 if depth == 0 { 791 return 0, ErrUnexpectedEndOfGroupTx 792 } 793 depth-- 794 case 5: 795 iNdEx += 4 796 default: 797 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 798 } 799 if iNdEx < 0 { 800 return 0, ErrInvalidLengthTx 801 } 802 if depth == 0 { 803 return iNdEx, nil 804 } 805 } 806 return 0, io.ErrUnexpectedEOF 807 } 808 809 var ( 810 ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") 811 ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") 812 ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") 813 )