github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/genesis/spec/spec.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: spec.proto 3 4 package spec 5 6 import ( 7 fmt "fmt" 8 io "io" 9 math "math" 10 math_bits "math/bits" 11 12 _ "github.com/gogo/protobuf/gogoproto" 13 proto "github.com/gogo/protobuf/proto" 14 golang_proto "github.com/golang/protobuf/proto" 15 github_com_hyperledger_burrow_acm "github.com/hyperledger/burrow/acm" 16 balance "github.com/hyperledger/burrow/acm/balance" 17 crypto "github.com/hyperledger/burrow/crypto" 18 github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto" 19 ) 20 21 // Reference imports to suppress errors if they are not otherwise used. 22 var _ = proto.Marshal 23 var _ = golang_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 TemplateAccount struct { 34 Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` 35 Address *github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,2,opt,name=Address,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:",omitempty" toml:",omitempty"` 36 PublicKey *crypto.PublicKey `protobuf:"bytes,3,opt,name=PublicKey,proto3" json:",omitempty" toml:",omitempty"` 37 Amounts []balance.Balance `protobuf:"bytes,4,rep,name=Amounts,proto3" json:",omitempty" toml:",omitempty"` 38 Permissions []string `protobuf:"bytes,5,rep,name=Permissions,proto3" json:",omitempty" toml:",omitempty"` 39 Roles []string `protobuf:"bytes,6,rep,name=Roles,proto3" json:",omitempty" toml:",omitempty"` 40 Code *github_com_hyperledger_burrow_acm.Bytecode `protobuf:"bytes,7,opt,name=Code,proto3,customtype=github.com/hyperledger/burrow/acm.Bytecode" json:"Code,omitempty"` 41 XXX_unrecognized []byte `json:"-"` 42 } 43 44 func (m *TemplateAccount) Reset() { *m = TemplateAccount{} } 45 func (m *TemplateAccount) String() string { return proto.CompactTextString(m) } 46 func (*TemplateAccount) ProtoMessage() {} 47 func (*TemplateAccount) Descriptor() ([]byte, []int) { 48 return fileDescriptor_423806180556987f, []int{0} 49 } 50 func (m *TemplateAccount) XXX_Unmarshal(b []byte) error { 51 return m.Unmarshal(b) 52 } 53 func (m *TemplateAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 54 b = b[:cap(b)] 55 n, err := m.MarshalToSizedBuffer(b) 56 if err != nil { 57 return nil, err 58 } 59 return b[:n], nil 60 } 61 func (m *TemplateAccount) XXX_Merge(src proto.Message) { 62 xxx_messageInfo_TemplateAccount.Merge(m, src) 63 } 64 func (m *TemplateAccount) XXX_Size() int { 65 return m.Size() 66 } 67 func (m *TemplateAccount) XXX_DiscardUnknown() { 68 xxx_messageInfo_TemplateAccount.DiscardUnknown(m) 69 } 70 71 var xxx_messageInfo_TemplateAccount proto.InternalMessageInfo 72 73 func (m *TemplateAccount) GetName() string { 74 if m != nil { 75 return m.Name 76 } 77 return "" 78 } 79 80 func (m *TemplateAccount) GetPublicKey() *crypto.PublicKey { 81 if m != nil { 82 return m.PublicKey 83 } 84 return nil 85 } 86 87 func (m *TemplateAccount) GetAmounts() []balance.Balance { 88 if m != nil { 89 return m.Amounts 90 } 91 return nil 92 } 93 94 func (m *TemplateAccount) GetPermissions() []string { 95 if m != nil { 96 return m.Permissions 97 } 98 return nil 99 } 100 101 func (m *TemplateAccount) GetRoles() []string { 102 if m != nil { 103 return m.Roles 104 } 105 return nil 106 } 107 108 func (*TemplateAccount) XXX_MessageName() string { 109 return "spec.TemplateAccount" 110 } 111 func init() { 112 proto.RegisterType((*TemplateAccount)(nil), "spec.TemplateAccount") 113 golang_proto.RegisterType((*TemplateAccount)(nil), "spec.TemplateAccount") 114 } 115 116 func init() { proto.RegisterFile("spec.proto", fileDescriptor_423806180556987f) } 117 func init() { golang_proto.RegisterFile("spec.proto", fileDescriptor_423806180556987f) } 118 119 var fileDescriptor_423806180556987f = []byte{ 120 // 394 bytes of a gzipped FileDescriptorProto 121 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xbf, 0x8e, 0xd3, 0x40, 122 0x10, 0xc6, 0xb3, 0xc4, 0x77, 0x21, 0x9b, 0x43, 0x70, 0x2b, 0x0a, 0xeb, 0x0a, 0xaf, 0x15, 0x0a, 123 0x2c, 0x74, 0xb2, 0xa5, 0x50, 0x71, 0x5d, 0xcc, 0x9f, 0x06, 0x09, 0x9d, 0x7c, 0x57, 0xd1, 0xd9, 124 0xeb, 0x91, 0xcf, 0x92, 0xd7, 0x6b, 0xed, 0xae, 0x85, 0xfc, 0x16, 0x48, 0x34, 0xd4, 0x79, 0x12, 125 0x4a, 0x97, 0x94, 0x28, 0x85, 0x85, 0x9c, 0x8e, 0x92, 0x27, 0x40, 0xb6, 0x13, 0x42, 0xc5, 0xb9, 126 0xf2, 0x37, 0x33, 0xfa, 0x7e, 0x33, 0xde, 0x19, 0x8c, 0x55, 0x01, 0xcc, 0x2d, 0xa4, 0xd0, 0x82, 127 0x18, 0x9d, 0xbe, 0x78, 0x9a, 0x88, 0x44, 0xf4, 0x09, 0xaf, 0x53, 0x43, 0xed, 0xe2, 0x8c, 0xc9, 128 0xaa, 0xd0, 0x87, 0xe8, 0x51, 0x14, 0x66, 0x61, 0xce, 0x60, 0x08, 0x97, 0x5f, 0x0c, 0xfc, 0xf8, 129 0x16, 0x78, 0x91, 0x85, 0x1a, 0xd6, 0x8c, 0x89, 0x32, 0xd7, 0x84, 0x60, 0xe3, 0x43, 0xc8, 0xc1, 130 0x44, 0x36, 0x72, 0xe6, 0x41, 0xaf, 0x09, 0xc7, 0xb3, 0x75, 0x1c, 0x4b, 0x50, 0xca, 0x7c, 0x60, 131 0x23, 0xe7, 0xcc, 0xbf, 0xd9, 0x36, 0xf4, 0x32, 0x49, 0xf5, 0x5d, 0x19, 0xb9, 0x4c, 0x70, 0xef, 132 0xae, 0x2a, 0x40, 0x66, 0x10, 0x27, 0x20, 0xbd, 0xa8, 0x94, 0x52, 0x7c, 0xf2, 0xf6, 0x7d, 0xf7, 133 0xbe, 0x5f, 0x0d, 0xc5, 0x97, 0x82, 0xa7, 0x1a, 0x78, 0xa1, 0xab, 0xdf, 0x0d, 0x3d, 0xd7, 0x82, 134 0x67, 0x57, 0xcb, 0x63, 0x6e, 0x19, 0x1c, 0x7a, 0x90, 0x5b, 0x3c, 0xbf, 0x2e, 0xa3, 0x2c, 0x65, 135 0xef, 0xa1, 0x32, 0xa7, 0x36, 0x72, 0x16, 0xab, 0x73, 0x77, 0xcf, 0xfb, 0x5b, 0xf0, 0x9f, 0x8d, 136 0x61, 0x1e, 0x41, 0xe4, 0x06, 0xcf, 0xd6, 0xbc, 0xfb, 0x45, 0x65, 0x1a, 0xf6, 0xd4, 0x59, 0xac, 137 0x9e, 0xb8, 0x87, 0xd7, 0xf0, 0x87, 0xaf, 0xff, 0xbc, 0x6e, 0xe8, 0x64, 0xdc, 0xa8, 0x03, 0x89, 138 0xbc, 0xc5, 0x8b, 0x6b, 0x90, 0x3c, 0x55, 0x2a, 0x15, 0xb9, 0x32, 0x4f, 0xec, 0xa9, 0x33, 0x1f, 139 0x37, 0xd9, 0xbf, 0x3e, 0xf2, 0x0a, 0x9f, 0x04, 0x22, 0x03, 0x65, 0x9e, 0x8e, 0x07, 0x0c, 0x0e, 140 0xf2, 0x0e, 0x1b, 0xaf, 0x45, 0x0c, 0xe6, 0xac, 0x5f, 0xcc, 0xaa, 0x6e, 0x28, 0xda, 0x36, 0xf4, 141 0xc5, 0xff, 0x97, 0x13, 0x32, 0xee, 0xfa, 0x95, 0x06, 0x26, 0x62, 0x08, 0x7a, 0xff, 0xd5, 0xc3, 142 0xcf, 0x1b, 0x3a, 0xf9, 0xba, 0xa1, 0x13, 0xff, 0x4d, 0xdd, 0x5a, 0xe8, 0x7b, 0x6b, 0xa1, 0x1f, 143 0xad, 0x85, 0x7e, 0xb6, 0x16, 0xfa, 0xb6, 0xb3, 0x50, 0xbd, 0xb3, 0xd0, 0xc7, 0x7b, 0xa8, 0x09, 144 0xe4, 0xa0, 0x52, 0xe5, 0x75, 0xe7, 0x18, 0x9d, 0xf6, 0x27, 0xf6, 0xf2, 0x4f, 0x00, 0x00, 0x00, 145 0xff, 0xff, 0xf3, 0x21, 0x48, 0x2d, 0xa9, 0x02, 0x00, 0x00, 146 } 147 148 func (m *TemplateAccount) Marshal() (dAtA []byte, err error) { 149 size := m.Size() 150 dAtA = make([]byte, size) 151 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 152 if err != nil { 153 return nil, err 154 } 155 return dAtA[:n], nil 156 } 157 158 func (m *TemplateAccount) MarshalTo(dAtA []byte) (int, error) { 159 size := m.Size() 160 return m.MarshalToSizedBuffer(dAtA[:size]) 161 } 162 163 func (m *TemplateAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { 164 i := len(dAtA) 165 _ = i 166 var l int 167 _ = l 168 if m.XXX_unrecognized != nil { 169 i -= len(m.XXX_unrecognized) 170 copy(dAtA[i:], m.XXX_unrecognized) 171 } 172 if m.Code != nil { 173 { 174 size := m.Code.Size() 175 i -= size 176 if _, err := m.Code.MarshalTo(dAtA[i:]); err != nil { 177 return 0, err 178 } 179 i = encodeVarintSpec(dAtA, i, uint64(size)) 180 } 181 i-- 182 dAtA[i] = 0x3a 183 } 184 if len(m.Roles) > 0 { 185 for iNdEx := len(m.Roles) - 1; iNdEx >= 0; iNdEx-- { 186 i -= len(m.Roles[iNdEx]) 187 copy(dAtA[i:], m.Roles[iNdEx]) 188 i = encodeVarintSpec(dAtA, i, uint64(len(m.Roles[iNdEx]))) 189 i-- 190 dAtA[i] = 0x32 191 } 192 } 193 if len(m.Permissions) > 0 { 194 for iNdEx := len(m.Permissions) - 1; iNdEx >= 0; iNdEx-- { 195 i -= len(m.Permissions[iNdEx]) 196 copy(dAtA[i:], m.Permissions[iNdEx]) 197 i = encodeVarintSpec(dAtA, i, uint64(len(m.Permissions[iNdEx]))) 198 i-- 199 dAtA[i] = 0x2a 200 } 201 } 202 if len(m.Amounts) > 0 { 203 for iNdEx := len(m.Amounts) - 1; iNdEx >= 0; iNdEx-- { 204 { 205 size, err := m.Amounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 206 if err != nil { 207 return 0, err 208 } 209 i -= size 210 i = encodeVarintSpec(dAtA, i, uint64(size)) 211 } 212 i-- 213 dAtA[i] = 0x22 214 } 215 } 216 if m.PublicKey != nil { 217 { 218 size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) 219 if err != nil { 220 return 0, err 221 } 222 i -= size 223 i = encodeVarintSpec(dAtA, i, uint64(size)) 224 } 225 i-- 226 dAtA[i] = 0x1a 227 } 228 if m.Address != nil { 229 { 230 size := m.Address.Size() 231 i -= size 232 if _, err := m.Address.MarshalTo(dAtA[i:]); err != nil { 233 return 0, err 234 } 235 i = encodeVarintSpec(dAtA, i, uint64(size)) 236 } 237 i-- 238 dAtA[i] = 0x12 239 } 240 if len(m.Name) > 0 { 241 i -= len(m.Name) 242 copy(dAtA[i:], m.Name) 243 i = encodeVarintSpec(dAtA, i, uint64(len(m.Name))) 244 i-- 245 dAtA[i] = 0xa 246 } 247 return len(dAtA) - i, nil 248 } 249 250 func encodeVarintSpec(dAtA []byte, offset int, v uint64) int { 251 offset -= sovSpec(v) 252 base := offset 253 for v >= 1<<7 { 254 dAtA[offset] = uint8(v&0x7f | 0x80) 255 v >>= 7 256 offset++ 257 } 258 dAtA[offset] = uint8(v) 259 return base 260 } 261 func (m *TemplateAccount) Size() (n int) { 262 if m == nil { 263 return 0 264 } 265 var l int 266 _ = l 267 l = len(m.Name) 268 if l > 0 { 269 n += 1 + l + sovSpec(uint64(l)) 270 } 271 if m.Address != nil { 272 l = m.Address.Size() 273 n += 1 + l + sovSpec(uint64(l)) 274 } 275 if m.PublicKey != nil { 276 l = m.PublicKey.Size() 277 n += 1 + l + sovSpec(uint64(l)) 278 } 279 if len(m.Amounts) > 0 { 280 for _, e := range m.Amounts { 281 l = e.Size() 282 n += 1 + l + sovSpec(uint64(l)) 283 } 284 } 285 if len(m.Permissions) > 0 { 286 for _, s := range m.Permissions { 287 l = len(s) 288 n += 1 + l + sovSpec(uint64(l)) 289 } 290 } 291 if len(m.Roles) > 0 { 292 for _, s := range m.Roles { 293 l = len(s) 294 n += 1 + l + sovSpec(uint64(l)) 295 } 296 } 297 if m.Code != nil { 298 l = m.Code.Size() 299 n += 1 + l + sovSpec(uint64(l)) 300 } 301 if m.XXX_unrecognized != nil { 302 n += len(m.XXX_unrecognized) 303 } 304 return n 305 } 306 307 func sovSpec(x uint64) (n int) { 308 return (math_bits.Len64(x|1) + 6) / 7 309 } 310 func sozSpec(x uint64) (n int) { 311 return sovSpec(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 312 } 313 func (m *TemplateAccount) Unmarshal(dAtA []byte) error { 314 l := len(dAtA) 315 iNdEx := 0 316 for iNdEx < l { 317 preIndex := iNdEx 318 var wire uint64 319 for shift := uint(0); ; shift += 7 { 320 if shift >= 64 { 321 return ErrIntOverflowSpec 322 } 323 if iNdEx >= l { 324 return io.ErrUnexpectedEOF 325 } 326 b := dAtA[iNdEx] 327 iNdEx++ 328 wire |= uint64(b&0x7F) << shift 329 if b < 0x80 { 330 break 331 } 332 } 333 fieldNum := int32(wire >> 3) 334 wireType := int(wire & 0x7) 335 if wireType == 4 { 336 return fmt.Errorf("proto: TemplateAccount: wiretype end group for non-group") 337 } 338 if fieldNum <= 0 { 339 return fmt.Errorf("proto: TemplateAccount: illegal tag %d (wire type %d)", fieldNum, wire) 340 } 341 switch fieldNum { 342 case 1: 343 if wireType != 2 { 344 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 345 } 346 var stringLen uint64 347 for shift := uint(0); ; shift += 7 { 348 if shift >= 64 { 349 return ErrIntOverflowSpec 350 } 351 if iNdEx >= l { 352 return io.ErrUnexpectedEOF 353 } 354 b := dAtA[iNdEx] 355 iNdEx++ 356 stringLen |= uint64(b&0x7F) << shift 357 if b < 0x80 { 358 break 359 } 360 } 361 intStringLen := int(stringLen) 362 if intStringLen < 0 { 363 return ErrInvalidLengthSpec 364 } 365 postIndex := iNdEx + intStringLen 366 if postIndex < 0 { 367 return ErrInvalidLengthSpec 368 } 369 if postIndex > l { 370 return io.ErrUnexpectedEOF 371 } 372 m.Name = string(dAtA[iNdEx:postIndex]) 373 iNdEx = postIndex 374 case 2: 375 if wireType != 2 { 376 return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) 377 } 378 var byteLen int 379 for shift := uint(0); ; shift += 7 { 380 if shift >= 64 { 381 return ErrIntOverflowSpec 382 } 383 if iNdEx >= l { 384 return io.ErrUnexpectedEOF 385 } 386 b := dAtA[iNdEx] 387 iNdEx++ 388 byteLen |= int(b&0x7F) << shift 389 if b < 0x80 { 390 break 391 } 392 } 393 if byteLen < 0 { 394 return ErrInvalidLengthSpec 395 } 396 postIndex := iNdEx + byteLen 397 if postIndex < 0 { 398 return ErrInvalidLengthSpec 399 } 400 if postIndex > l { 401 return io.ErrUnexpectedEOF 402 } 403 var v github_com_hyperledger_burrow_crypto.Address 404 m.Address = &v 405 if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 406 return err 407 } 408 iNdEx = postIndex 409 case 3: 410 if wireType != 2 { 411 return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) 412 } 413 var msglen int 414 for shift := uint(0); ; shift += 7 { 415 if shift >= 64 { 416 return ErrIntOverflowSpec 417 } 418 if iNdEx >= l { 419 return io.ErrUnexpectedEOF 420 } 421 b := dAtA[iNdEx] 422 iNdEx++ 423 msglen |= int(b&0x7F) << shift 424 if b < 0x80 { 425 break 426 } 427 } 428 if msglen < 0 { 429 return ErrInvalidLengthSpec 430 } 431 postIndex := iNdEx + msglen 432 if postIndex < 0 { 433 return ErrInvalidLengthSpec 434 } 435 if postIndex > l { 436 return io.ErrUnexpectedEOF 437 } 438 if m.PublicKey == nil { 439 m.PublicKey = &crypto.PublicKey{} 440 } 441 if err := m.PublicKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 442 return err 443 } 444 iNdEx = postIndex 445 case 4: 446 if wireType != 2 { 447 return fmt.Errorf("proto: wrong wireType = %d for field Amounts", wireType) 448 } 449 var msglen int 450 for shift := uint(0); ; shift += 7 { 451 if shift >= 64 { 452 return ErrIntOverflowSpec 453 } 454 if iNdEx >= l { 455 return io.ErrUnexpectedEOF 456 } 457 b := dAtA[iNdEx] 458 iNdEx++ 459 msglen |= int(b&0x7F) << shift 460 if b < 0x80 { 461 break 462 } 463 } 464 if msglen < 0 { 465 return ErrInvalidLengthSpec 466 } 467 postIndex := iNdEx + msglen 468 if postIndex < 0 { 469 return ErrInvalidLengthSpec 470 } 471 if postIndex > l { 472 return io.ErrUnexpectedEOF 473 } 474 m.Amounts = append(m.Amounts, balance.Balance{}) 475 if err := m.Amounts[len(m.Amounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 476 return err 477 } 478 iNdEx = postIndex 479 case 5: 480 if wireType != 2 { 481 return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) 482 } 483 var stringLen uint64 484 for shift := uint(0); ; shift += 7 { 485 if shift >= 64 { 486 return ErrIntOverflowSpec 487 } 488 if iNdEx >= l { 489 return io.ErrUnexpectedEOF 490 } 491 b := dAtA[iNdEx] 492 iNdEx++ 493 stringLen |= uint64(b&0x7F) << shift 494 if b < 0x80 { 495 break 496 } 497 } 498 intStringLen := int(stringLen) 499 if intStringLen < 0 { 500 return ErrInvalidLengthSpec 501 } 502 postIndex := iNdEx + intStringLen 503 if postIndex < 0 { 504 return ErrInvalidLengthSpec 505 } 506 if postIndex > l { 507 return io.ErrUnexpectedEOF 508 } 509 m.Permissions = append(m.Permissions, string(dAtA[iNdEx:postIndex])) 510 iNdEx = postIndex 511 case 6: 512 if wireType != 2 { 513 return fmt.Errorf("proto: wrong wireType = %d for field Roles", wireType) 514 } 515 var stringLen uint64 516 for shift := uint(0); ; shift += 7 { 517 if shift >= 64 { 518 return ErrIntOverflowSpec 519 } 520 if iNdEx >= l { 521 return io.ErrUnexpectedEOF 522 } 523 b := dAtA[iNdEx] 524 iNdEx++ 525 stringLen |= uint64(b&0x7F) << shift 526 if b < 0x80 { 527 break 528 } 529 } 530 intStringLen := int(stringLen) 531 if intStringLen < 0 { 532 return ErrInvalidLengthSpec 533 } 534 postIndex := iNdEx + intStringLen 535 if postIndex < 0 { 536 return ErrInvalidLengthSpec 537 } 538 if postIndex > l { 539 return io.ErrUnexpectedEOF 540 } 541 m.Roles = append(m.Roles, string(dAtA[iNdEx:postIndex])) 542 iNdEx = postIndex 543 case 7: 544 if wireType != 2 { 545 return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) 546 } 547 var byteLen int 548 for shift := uint(0); ; shift += 7 { 549 if shift >= 64 { 550 return ErrIntOverflowSpec 551 } 552 if iNdEx >= l { 553 return io.ErrUnexpectedEOF 554 } 555 b := dAtA[iNdEx] 556 iNdEx++ 557 byteLen |= int(b&0x7F) << shift 558 if b < 0x80 { 559 break 560 } 561 } 562 if byteLen < 0 { 563 return ErrInvalidLengthSpec 564 } 565 postIndex := iNdEx + byteLen 566 if postIndex < 0 { 567 return ErrInvalidLengthSpec 568 } 569 if postIndex > l { 570 return io.ErrUnexpectedEOF 571 } 572 var v github_com_hyperledger_burrow_acm.Bytecode 573 m.Code = &v 574 if err := m.Code.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 575 return err 576 } 577 iNdEx = postIndex 578 default: 579 iNdEx = preIndex 580 skippy, err := skipSpec(dAtA[iNdEx:]) 581 if err != nil { 582 return err 583 } 584 if (skippy < 0) || (iNdEx+skippy) < 0 { 585 return ErrInvalidLengthSpec 586 } 587 if (iNdEx + skippy) > l { 588 return io.ErrUnexpectedEOF 589 } 590 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 591 iNdEx += skippy 592 } 593 } 594 595 if iNdEx > l { 596 return io.ErrUnexpectedEOF 597 } 598 return nil 599 } 600 func skipSpec(dAtA []byte) (n int, err error) { 601 l := len(dAtA) 602 iNdEx := 0 603 depth := 0 604 for iNdEx < l { 605 var wire uint64 606 for shift := uint(0); ; shift += 7 { 607 if shift >= 64 { 608 return 0, ErrIntOverflowSpec 609 } 610 if iNdEx >= l { 611 return 0, io.ErrUnexpectedEOF 612 } 613 b := dAtA[iNdEx] 614 iNdEx++ 615 wire |= (uint64(b) & 0x7F) << shift 616 if b < 0x80 { 617 break 618 } 619 } 620 wireType := int(wire & 0x7) 621 switch wireType { 622 case 0: 623 for shift := uint(0); ; shift += 7 { 624 if shift >= 64 { 625 return 0, ErrIntOverflowSpec 626 } 627 if iNdEx >= l { 628 return 0, io.ErrUnexpectedEOF 629 } 630 iNdEx++ 631 if dAtA[iNdEx-1] < 0x80 { 632 break 633 } 634 } 635 case 1: 636 iNdEx += 8 637 case 2: 638 var length int 639 for shift := uint(0); ; shift += 7 { 640 if shift >= 64 { 641 return 0, ErrIntOverflowSpec 642 } 643 if iNdEx >= l { 644 return 0, io.ErrUnexpectedEOF 645 } 646 b := dAtA[iNdEx] 647 iNdEx++ 648 length |= (int(b) & 0x7F) << shift 649 if b < 0x80 { 650 break 651 } 652 } 653 if length < 0 { 654 return 0, ErrInvalidLengthSpec 655 } 656 iNdEx += length 657 case 3: 658 depth++ 659 case 4: 660 if depth == 0 { 661 return 0, ErrUnexpectedEndOfGroupSpec 662 } 663 depth-- 664 case 5: 665 iNdEx += 4 666 default: 667 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 668 } 669 if iNdEx < 0 { 670 return 0, ErrInvalidLengthSpec 671 } 672 if depth == 0 { 673 return iNdEx, nil 674 } 675 } 676 return 0, io.ErrUnexpectedEOF 677 } 678 679 var ( 680 ErrInvalidLengthSpec = fmt.Errorf("proto: negative length found during unmarshaling") 681 ErrIntOverflowSpec = fmt.Errorf("proto: integer overflow") 682 ErrUnexpectedEndOfGroupSpec = fmt.Errorf("proto: unexpected end of group") 683 )