github.com/cosmos/cosmos-sdk@v0.50.10/x/params/types/proposal/params.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: cosmos/params/v1beta1/params.proto 3 4 package proposal 5 6 import ( 7 fmt "fmt" 8 _ "github.com/cosmos/cosmos-proto" 9 _ "github.com/cosmos/cosmos-sdk/types/tx/amino" 10 _ "github.com/cosmos/gogoproto/gogoproto" 11 proto "github.com/cosmos/gogoproto/proto" 12 io "io" 13 math "math" 14 math_bits "math/bits" 15 ) 16 17 // Reference imports to suppress errors if they are not otherwise used. 18 var _ = proto.Marshal 19 var _ = fmt.Errorf 20 var _ = math.Inf 21 22 // This is a compile-time assertion to ensure that this generated file 23 // is compatible with the proto package it is being compiled against. 24 // A compilation error at this line likely means your copy of the 25 // proto package needs to be updated. 26 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 27 28 // ParameterChangeProposal defines a proposal to change one or more parameters. 29 type ParameterChangeProposal struct { 30 Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` 31 Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` 32 Changes []ParamChange `protobuf:"bytes,3,rep,name=changes,proto3" json:"changes"` 33 } 34 35 func (m *ParameterChangeProposal) Reset() { *m = ParameterChangeProposal{} } 36 func (m *ParameterChangeProposal) String() string { return proto.CompactTextString(m) } 37 func (*ParameterChangeProposal) ProtoMessage() {} 38 func (*ParameterChangeProposal) Descriptor() ([]byte, []int) { 39 return fileDescriptor_53a944ecb0483e4c, []int{0} 40 } 41 func (m *ParameterChangeProposal) XXX_Unmarshal(b []byte) error { 42 return m.Unmarshal(b) 43 } 44 func (m *ParameterChangeProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 45 if deterministic { 46 return xxx_messageInfo_ParameterChangeProposal.Marshal(b, m, deterministic) 47 } else { 48 b = b[:cap(b)] 49 n, err := m.MarshalToSizedBuffer(b) 50 if err != nil { 51 return nil, err 52 } 53 return b[:n], nil 54 } 55 } 56 func (m *ParameterChangeProposal) XXX_Merge(src proto.Message) { 57 xxx_messageInfo_ParameterChangeProposal.Merge(m, src) 58 } 59 func (m *ParameterChangeProposal) XXX_Size() int { 60 return m.Size() 61 } 62 func (m *ParameterChangeProposal) XXX_DiscardUnknown() { 63 xxx_messageInfo_ParameterChangeProposal.DiscardUnknown(m) 64 } 65 66 var xxx_messageInfo_ParameterChangeProposal proto.InternalMessageInfo 67 68 // ParamChange defines an individual parameter change, for use in 69 // ParameterChangeProposal. 70 type ParamChange struct { 71 Subspace string `protobuf:"bytes,1,opt,name=subspace,proto3" json:"subspace,omitempty"` 72 Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` 73 Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` 74 } 75 76 func (m *ParamChange) Reset() { *m = ParamChange{} } 77 func (m *ParamChange) String() string { return proto.CompactTextString(m) } 78 func (*ParamChange) ProtoMessage() {} 79 func (*ParamChange) Descriptor() ([]byte, []int) { 80 return fileDescriptor_53a944ecb0483e4c, []int{1} 81 } 82 func (m *ParamChange) XXX_Unmarshal(b []byte) error { 83 return m.Unmarshal(b) 84 } 85 func (m *ParamChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 86 if deterministic { 87 return xxx_messageInfo_ParamChange.Marshal(b, m, deterministic) 88 } else { 89 b = b[:cap(b)] 90 n, err := m.MarshalToSizedBuffer(b) 91 if err != nil { 92 return nil, err 93 } 94 return b[:n], nil 95 } 96 } 97 func (m *ParamChange) XXX_Merge(src proto.Message) { 98 xxx_messageInfo_ParamChange.Merge(m, src) 99 } 100 func (m *ParamChange) XXX_Size() int { 101 return m.Size() 102 } 103 func (m *ParamChange) XXX_DiscardUnknown() { 104 xxx_messageInfo_ParamChange.DiscardUnknown(m) 105 } 106 107 var xxx_messageInfo_ParamChange proto.InternalMessageInfo 108 109 func (m *ParamChange) GetSubspace() string { 110 if m != nil { 111 return m.Subspace 112 } 113 return "" 114 } 115 116 func (m *ParamChange) GetKey() string { 117 if m != nil { 118 return m.Key 119 } 120 return "" 121 } 122 123 func (m *ParamChange) GetValue() string { 124 if m != nil { 125 return m.Value 126 } 127 return "" 128 } 129 130 func init() { 131 proto.RegisterType((*ParameterChangeProposal)(nil), "cosmos.params.v1beta1.ParameterChangeProposal") 132 proto.RegisterType((*ParamChange)(nil), "cosmos.params.v1beta1.ParamChange") 133 } 134 135 func init() { 136 proto.RegisterFile("cosmos/params/v1beta1/params.proto", fileDescriptor_53a944ecb0483e4c) 137 } 138 139 var fileDescriptor_53a944ecb0483e4c = []byte{ 140 // 354 bytes of a gzipped FileDescriptorProto 141 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4a, 0xce, 0x2f, 0xce, 142 0xcd, 0x2f, 0xd6, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 143 0x34, 0x84, 0x72, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x44, 0x21, 0x6a, 0xf4, 0xa0, 0x82, 144 0x50, 0x35, 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0x15, 0xfa, 0x20, 0x16, 0x44, 0xb1, 0x94, 145 0x24, 0x44, 0x71, 0x3c, 0x44, 0x02, 0xa6, 0x13, 0x2c, 0x25, 0x98, 0x98, 0x9b, 0x99, 0x97, 0xaf, 146 0x0f, 0x26, 0x21, 0x42, 0x4a, 0x4f, 0x19, 0xb9, 0xc4, 0x03, 0x40, 0xc6, 0xa6, 0x96, 0xa4, 0x16, 147 0x39, 0x67, 0x24, 0xe6, 0xa5, 0xa7, 0x06, 0x14, 0xe5, 0x17, 0xe4, 0x17, 0x27, 0xe6, 0x08, 0x89, 148 0x70, 0xb1, 0x96, 0x64, 0x96, 0xe4, 0xa4, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x41, 0x38, 149 0x42, 0x0a, 0x5c, 0xdc, 0x29, 0xa9, 0xc5, 0xc9, 0x45, 0x99, 0x05, 0x25, 0x99, 0xf9, 0x79, 0x12, 150 0x4c, 0x60, 0x39, 0x64, 0x21, 0x21, 0x77, 0x2e, 0xf6, 0x64, 0xb0, 0x49, 0xc5, 0x12, 0xcc, 0x0a, 151 0xcc, 0x1a, 0xdc, 0x46, 0x4a, 0x7a, 0x58, 0x3d, 0xa0, 0x07, 0xb6, 0x18, 0x62, 0xa9, 0x13, 0xe7, 152 0x89, 0x7b, 0xf2, 0x0c, 0x2b, 0x9e, 0x6f, 0xd0, 0x62, 0x0c, 0x82, 0xe9, 0xb6, 0xf2, 0xec, 0x58, 153 0x20, 0xcf, 0x70, 0x6a, 0x8b, 0xae, 0x14, 0x54, 0x7b, 0x7a, 0x7e, 0x19, 0x5c, 0xaf, 0x73, 0x7e, 154 0x5e, 0x49, 0x6a, 0x5e, 0x49, 0xd7, 0xf3, 0x0d, 0x5a, 0xd0, 0x20, 0xd4, 0x2d, 0x4e, 0xc9, 0xd6, 155 0xc7, 0xe1, 0x17, 0xa5, 0x40, 0x2e, 0x6e, 0x24, 0xdb, 0x84, 0xa4, 0xb8, 0x38, 0x8a, 0x4b, 0x93, 156 0x8a, 0x0b, 0x12, 0x93, 0x61, 0xbe, 0x83, 0xf3, 0x85, 0x04, 0xb8, 0x98, 0xb3, 0x53, 0x2b, 0xa1, 157 0x1e, 0x03, 0x31, 0x41, 0x01, 0x51, 0x96, 0x98, 0x53, 0x9a, 0x2a, 0xc1, 0x0c, 0x09, 0x08, 0x30, 158 0xc7, 0x29, 0x68, 0xc5, 0x23, 0x39, 0xc6, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 159 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 160 0x88, 0x32, 0x49, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0x85, 0x46, 0x82, 0x3e, 161 0x92, 0x33, 0x2b, 0x60, 0xf1, 0x5d, 0x52, 0x59, 0x90, 0x5a, 0xac, 0x5f, 0x00, 0x75, 0x66, 0x12, 162 0x1b, 0x38, 0x56, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb3, 0x70, 0xe1, 0x82, 0x16, 0x02, 163 0x00, 0x00, 164 } 165 166 func (this *ParameterChangeProposal) Equal(that interface{}) bool { 167 if that == nil { 168 return this == nil 169 } 170 171 that1, ok := that.(*ParameterChangeProposal) 172 if !ok { 173 that2, ok := that.(ParameterChangeProposal) 174 if ok { 175 that1 = &that2 176 } else { 177 return false 178 } 179 } 180 if that1 == nil { 181 return this == nil 182 } else if this == nil { 183 return false 184 } 185 if this.Title != that1.Title { 186 return false 187 } 188 if this.Description != that1.Description { 189 return false 190 } 191 if len(this.Changes) != len(that1.Changes) { 192 return false 193 } 194 for i := range this.Changes { 195 if !this.Changes[i].Equal(&that1.Changes[i]) { 196 return false 197 } 198 } 199 return true 200 } 201 func (this *ParamChange) Equal(that interface{}) bool { 202 if that == nil { 203 return this == nil 204 } 205 206 that1, ok := that.(*ParamChange) 207 if !ok { 208 that2, ok := that.(ParamChange) 209 if ok { 210 that1 = &that2 211 } else { 212 return false 213 } 214 } 215 if that1 == nil { 216 return this == nil 217 } else if this == nil { 218 return false 219 } 220 if this.Subspace != that1.Subspace { 221 return false 222 } 223 if this.Key != that1.Key { 224 return false 225 } 226 if this.Value != that1.Value { 227 return false 228 } 229 return true 230 } 231 func (m *ParameterChangeProposal) Marshal() (dAtA []byte, err error) { 232 size := m.Size() 233 dAtA = make([]byte, size) 234 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 235 if err != nil { 236 return nil, err 237 } 238 return dAtA[:n], nil 239 } 240 241 func (m *ParameterChangeProposal) MarshalTo(dAtA []byte) (int, error) { 242 size := m.Size() 243 return m.MarshalToSizedBuffer(dAtA[:size]) 244 } 245 246 func (m *ParameterChangeProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { 247 i := len(dAtA) 248 _ = i 249 var l int 250 _ = l 251 if len(m.Changes) > 0 { 252 for iNdEx := len(m.Changes) - 1; iNdEx >= 0; iNdEx-- { 253 { 254 size, err := m.Changes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 255 if err != nil { 256 return 0, err 257 } 258 i -= size 259 i = encodeVarintParams(dAtA, i, uint64(size)) 260 } 261 i-- 262 dAtA[i] = 0x1a 263 } 264 } 265 if len(m.Description) > 0 { 266 i -= len(m.Description) 267 copy(dAtA[i:], m.Description) 268 i = encodeVarintParams(dAtA, i, uint64(len(m.Description))) 269 i-- 270 dAtA[i] = 0x12 271 } 272 if len(m.Title) > 0 { 273 i -= len(m.Title) 274 copy(dAtA[i:], m.Title) 275 i = encodeVarintParams(dAtA, i, uint64(len(m.Title))) 276 i-- 277 dAtA[i] = 0xa 278 } 279 return len(dAtA) - i, nil 280 } 281 282 func (m *ParamChange) 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 *ParamChange) MarshalTo(dAtA []byte) (int, error) { 293 size := m.Size() 294 return m.MarshalToSizedBuffer(dAtA[:size]) 295 } 296 297 func (m *ParamChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { 298 i := len(dAtA) 299 _ = i 300 var l int 301 _ = l 302 if len(m.Value) > 0 { 303 i -= len(m.Value) 304 copy(dAtA[i:], m.Value) 305 i = encodeVarintParams(dAtA, i, uint64(len(m.Value))) 306 i-- 307 dAtA[i] = 0x1a 308 } 309 if len(m.Key) > 0 { 310 i -= len(m.Key) 311 copy(dAtA[i:], m.Key) 312 i = encodeVarintParams(dAtA, i, uint64(len(m.Key))) 313 i-- 314 dAtA[i] = 0x12 315 } 316 if len(m.Subspace) > 0 { 317 i -= len(m.Subspace) 318 copy(dAtA[i:], m.Subspace) 319 i = encodeVarintParams(dAtA, i, uint64(len(m.Subspace))) 320 i-- 321 dAtA[i] = 0xa 322 } 323 return len(dAtA) - i, nil 324 } 325 326 func encodeVarintParams(dAtA []byte, offset int, v uint64) int { 327 offset -= sovParams(v) 328 base := offset 329 for v >= 1<<7 { 330 dAtA[offset] = uint8(v&0x7f | 0x80) 331 v >>= 7 332 offset++ 333 } 334 dAtA[offset] = uint8(v) 335 return base 336 } 337 func (m *ParameterChangeProposal) Size() (n int) { 338 if m == nil { 339 return 0 340 } 341 var l int 342 _ = l 343 l = len(m.Title) 344 if l > 0 { 345 n += 1 + l + sovParams(uint64(l)) 346 } 347 l = len(m.Description) 348 if l > 0 { 349 n += 1 + l + sovParams(uint64(l)) 350 } 351 if len(m.Changes) > 0 { 352 for _, e := range m.Changes { 353 l = e.Size() 354 n += 1 + l + sovParams(uint64(l)) 355 } 356 } 357 return n 358 } 359 360 func (m *ParamChange) Size() (n int) { 361 if m == nil { 362 return 0 363 } 364 var l int 365 _ = l 366 l = len(m.Subspace) 367 if l > 0 { 368 n += 1 + l + sovParams(uint64(l)) 369 } 370 l = len(m.Key) 371 if l > 0 { 372 n += 1 + l + sovParams(uint64(l)) 373 } 374 l = len(m.Value) 375 if l > 0 { 376 n += 1 + l + sovParams(uint64(l)) 377 } 378 return n 379 } 380 381 func sovParams(x uint64) (n int) { 382 return (math_bits.Len64(x|1) + 6) / 7 383 } 384 func sozParams(x uint64) (n int) { 385 return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 386 } 387 func (m *ParameterChangeProposal) Unmarshal(dAtA []byte) error { 388 l := len(dAtA) 389 iNdEx := 0 390 for iNdEx < l { 391 preIndex := iNdEx 392 var wire uint64 393 for shift := uint(0); ; shift += 7 { 394 if shift >= 64 { 395 return ErrIntOverflowParams 396 } 397 if iNdEx >= l { 398 return io.ErrUnexpectedEOF 399 } 400 b := dAtA[iNdEx] 401 iNdEx++ 402 wire |= uint64(b&0x7F) << shift 403 if b < 0x80 { 404 break 405 } 406 } 407 fieldNum := int32(wire >> 3) 408 wireType := int(wire & 0x7) 409 if wireType == 4 { 410 return fmt.Errorf("proto: ParameterChangeProposal: wiretype end group for non-group") 411 } 412 if fieldNum <= 0 { 413 return fmt.Errorf("proto: ParameterChangeProposal: illegal tag %d (wire type %d)", fieldNum, wire) 414 } 415 switch fieldNum { 416 case 1: 417 if wireType != 2 { 418 return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) 419 } 420 var stringLen uint64 421 for shift := uint(0); ; shift += 7 { 422 if shift >= 64 { 423 return ErrIntOverflowParams 424 } 425 if iNdEx >= l { 426 return io.ErrUnexpectedEOF 427 } 428 b := dAtA[iNdEx] 429 iNdEx++ 430 stringLen |= uint64(b&0x7F) << shift 431 if b < 0x80 { 432 break 433 } 434 } 435 intStringLen := int(stringLen) 436 if intStringLen < 0 { 437 return ErrInvalidLengthParams 438 } 439 postIndex := iNdEx + intStringLen 440 if postIndex < 0 { 441 return ErrInvalidLengthParams 442 } 443 if postIndex > l { 444 return io.ErrUnexpectedEOF 445 } 446 m.Title = string(dAtA[iNdEx:postIndex]) 447 iNdEx = postIndex 448 case 2: 449 if wireType != 2 { 450 return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) 451 } 452 var stringLen uint64 453 for shift := uint(0); ; shift += 7 { 454 if shift >= 64 { 455 return ErrIntOverflowParams 456 } 457 if iNdEx >= l { 458 return io.ErrUnexpectedEOF 459 } 460 b := dAtA[iNdEx] 461 iNdEx++ 462 stringLen |= uint64(b&0x7F) << shift 463 if b < 0x80 { 464 break 465 } 466 } 467 intStringLen := int(stringLen) 468 if intStringLen < 0 { 469 return ErrInvalidLengthParams 470 } 471 postIndex := iNdEx + intStringLen 472 if postIndex < 0 { 473 return ErrInvalidLengthParams 474 } 475 if postIndex > l { 476 return io.ErrUnexpectedEOF 477 } 478 m.Description = string(dAtA[iNdEx:postIndex]) 479 iNdEx = postIndex 480 case 3: 481 if wireType != 2 { 482 return fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) 483 } 484 var msglen int 485 for shift := uint(0); ; shift += 7 { 486 if shift >= 64 { 487 return ErrIntOverflowParams 488 } 489 if iNdEx >= l { 490 return io.ErrUnexpectedEOF 491 } 492 b := dAtA[iNdEx] 493 iNdEx++ 494 msglen |= int(b&0x7F) << shift 495 if b < 0x80 { 496 break 497 } 498 } 499 if msglen < 0 { 500 return ErrInvalidLengthParams 501 } 502 postIndex := iNdEx + msglen 503 if postIndex < 0 { 504 return ErrInvalidLengthParams 505 } 506 if postIndex > l { 507 return io.ErrUnexpectedEOF 508 } 509 m.Changes = append(m.Changes, ParamChange{}) 510 if err := m.Changes[len(m.Changes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 511 return err 512 } 513 iNdEx = postIndex 514 default: 515 iNdEx = preIndex 516 skippy, err := skipParams(dAtA[iNdEx:]) 517 if err != nil { 518 return err 519 } 520 if (skippy < 0) || (iNdEx+skippy) < 0 { 521 return ErrInvalidLengthParams 522 } 523 if (iNdEx + skippy) > l { 524 return io.ErrUnexpectedEOF 525 } 526 iNdEx += skippy 527 } 528 } 529 530 if iNdEx > l { 531 return io.ErrUnexpectedEOF 532 } 533 return nil 534 } 535 func (m *ParamChange) Unmarshal(dAtA []byte) error { 536 l := len(dAtA) 537 iNdEx := 0 538 for iNdEx < l { 539 preIndex := iNdEx 540 var wire uint64 541 for shift := uint(0); ; shift += 7 { 542 if shift >= 64 { 543 return ErrIntOverflowParams 544 } 545 if iNdEx >= l { 546 return io.ErrUnexpectedEOF 547 } 548 b := dAtA[iNdEx] 549 iNdEx++ 550 wire |= uint64(b&0x7F) << shift 551 if b < 0x80 { 552 break 553 } 554 } 555 fieldNum := int32(wire >> 3) 556 wireType := int(wire & 0x7) 557 if wireType == 4 { 558 return fmt.Errorf("proto: ParamChange: wiretype end group for non-group") 559 } 560 if fieldNum <= 0 { 561 return fmt.Errorf("proto: ParamChange: illegal tag %d (wire type %d)", fieldNum, wire) 562 } 563 switch fieldNum { 564 case 1: 565 if wireType != 2 { 566 return fmt.Errorf("proto: wrong wireType = %d for field Subspace", wireType) 567 } 568 var stringLen uint64 569 for shift := uint(0); ; shift += 7 { 570 if shift >= 64 { 571 return ErrIntOverflowParams 572 } 573 if iNdEx >= l { 574 return io.ErrUnexpectedEOF 575 } 576 b := dAtA[iNdEx] 577 iNdEx++ 578 stringLen |= uint64(b&0x7F) << shift 579 if b < 0x80 { 580 break 581 } 582 } 583 intStringLen := int(stringLen) 584 if intStringLen < 0 { 585 return ErrInvalidLengthParams 586 } 587 postIndex := iNdEx + intStringLen 588 if postIndex < 0 { 589 return ErrInvalidLengthParams 590 } 591 if postIndex > l { 592 return io.ErrUnexpectedEOF 593 } 594 m.Subspace = string(dAtA[iNdEx:postIndex]) 595 iNdEx = postIndex 596 case 2: 597 if wireType != 2 { 598 return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) 599 } 600 var stringLen uint64 601 for shift := uint(0); ; shift += 7 { 602 if shift >= 64 { 603 return ErrIntOverflowParams 604 } 605 if iNdEx >= l { 606 return io.ErrUnexpectedEOF 607 } 608 b := dAtA[iNdEx] 609 iNdEx++ 610 stringLen |= uint64(b&0x7F) << shift 611 if b < 0x80 { 612 break 613 } 614 } 615 intStringLen := int(stringLen) 616 if intStringLen < 0 { 617 return ErrInvalidLengthParams 618 } 619 postIndex := iNdEx + intStringLen 620 if postIndex < 0 { 621 return ErrInvalidLengthParams 622 } 623 if postIndex > l { 624 return io.ErrUnexpectedEOF 625 } 626 m.Key = string(dAtA[iNdEx:postIndex]) 627 iNdEx = postIndex 628 case 3: 629 if wireType != 2 { 630 return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) 631 } 632 var stringLen uint64 633 for shift := uint(0); ; shift += 7 { 634 if shift >= 64 { 635 return ErrIntOverflowParams 636 } 637 if iNdEx >= l { 638 return io.ErrUnexpectedEOF 639 } 640 b := dAtA[iNdEx] 641 iNdEx++ 642 stringLen |= uint64(b&0x7F) << shift 643 if b < 0x80 { 644 break 645 } 646 } 647 intStringLen := int(stringLen) 648 if intStringLen < 0 { 649 return ErrInvalidLengthParams 650 } 651 postIndex := iNdEx + intStringLen 652 if postIndex < 0 { 653 return ErrInvalidLengthParams 654 } 655 if postIndex > l { 656 return io.ErrUnexpectedEOF 657 } 658 m.Value = string(dAtA[iNdEx:postIndex]) 659 iNdEx = postIndex 660 default: 661 iNdEx = preIndex 662 skippy, err := skipParams(dAtA[iNdEx:]) 663 if err != nil { 664 return err 665 } 666 if (skippy < 0) || (iNdEx+skippy) < 0 { 667 return ErrInvalidLengthParams 668 } 669 if (iNdEx + skippy) > l { 670 return io.ErrUnexpectedEOF 671 } 672 iNdEx += skippy 673 } 674 } 675 676 if iNdEx > l { 677 return io.ErrUnexpectedEOF 678 } 679 return nil 680 } 681 func skipParams(dAtA []byte) (n int, err error) { 682 l := len(dAtA) 683 iNdEx := 0 684 depth := 0 685 for iNdEx < l { 686 var wire uint64 687 for shift := uint(0); ; shift += 7 { 688 if shift >= 64 { 689 return 0, ErrIntOverflowParams 690 } 691 if iNdEx >= l { 692 return 0, io.ErrUnexpectedEOF 693 } 694 b := dAtA[iNdEx] 695 iNdEx++ 696 wire |= (uint64(b) & 0x7F) << shift 697 if b < 0x80 { 698 break 699 } 700 } 701 wireType := int(wire & 0x7) 702 switch wireType { 703 case 0: 704 for shift := uint(0); ; shift += 7 { 705 if shift >= 64 { 706 return 0, ErrIntOverflowParams 707 } 708 if iNdEx >= l { 709 return 0, io.ErrUnexpectedEOF 710 } 711 iNdEx++ 712 if dAtA[iNdEx-1] < 0x80 { 713 break 714 } 715 } 716 case 1: 717 iNdEx += 8 718 case 2: 719 var length int 720 for shift := uint(0); ; shift += 7 { 721 if shift >= 64 { 722 return 0, ErrIntOverflowParams 723 } 724 if iNdEx >= l { 725 return 0, io.ErrUnexpectedEOF 726 } 727 b := dAtA[iNdEx] 728 iNdEx++ 729 length |= (int(b) & 0x7F) << shift 730 if b < 0x80 { 731 break 732 } 733 } 734 if length < 0 { 735 return 0, ErrInvalidLengthParams 736 } 737 iNdEx += length 738 case 3: 739 depth++ 740 case 4: 741 if depth == 0 { 742 return 0, ErrUnexpectedEndOfGroupParams 743 } 744 depth-- 745 case 5: 746 iNdEx += 4 747 default: 748 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 749 } 750 if iNdEx < 0 { 751 return 0, ErrInvalidLengthParams 752 } 753 if depth == 0 { 754 return iNdEx, nil 755 } 756 } 757 return 0, io.ErrUnexpectedEOF 758 } 759 760 var ( 761 ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") 762 ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") 763 ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") 764 )