github.com/cockroachdb/cockroachdb-parser@v0.23.3-0.20240213214944-911057d40c9a/pkg/sql/sessiondatapb/session_revival_token.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: sql/sessiondatapb/session_revival_token.proto 3 4 package sessiondatapb 5 6 import ( 7 fmt "fmt" 8 proto "github.com/gogo/protobuf/proto" 9 types "github.com/gogo/protobuf/types" 10 io "io" 11 math "math" 12 math_bits "math/bits" 13 ) 14 15 // Reference imports to suppress errors if they are not otherwise used. 16 var _ = proto.Marshal 17 var _ = fmt.Errorf 18 var _ = math.Inf 19 20 // This is a compile-time assertion to ensure that this generated file 21 // is compatible with the proto package it is being compiled against. 22 // A compilation error at this line likely means your copy of the 23 // proto package needs to be updated. 24 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 25 26 // SessionRevivalToken is an opaque piece of data that can be used to 27 // authenticate a new SQL session for the user who created this token. 28 type SessionRevivalToken struct { 29 // The payload to sign. This uses raw bytes so the data being signed is 30 // deterministic and not dependent on the proto version. 31 Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` 32 // The signature of the payload, signed using the new signing key. 33 Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` 34 } 35 36 func (m *SessionRevivalToken) Reset() { *m = SessionRevivalToken{} } 37 func (m *SessionRevivalToken) String() string { return proto.CompactTextString(m) } 38 func (*SessionRevivalToken) ProtoMessage() {} 39 func (*SessionRevivalToken) Descriptor() ([]byte, []int) { 40 return fileDescriptor_12138428403833e1, []int{0} 41 } 42 func (m *SessionRevivalToken) XXX_Unmarshal(b []byte) error { 43 return m.Unmarshal(b) 44 } 45 func (m *SessionRevivalToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 46 b = b[:cap(b)] 47 n, err := m.MarshalToSizedBuffer(b) 48 if err != nil { 49 return nil, err 50 } 51 return b[:n], nil 52 } 53 func (m *SessionRevivalToken) XXX_Merge(src proto.Message) { 54 xxx_messageInfo_SessionRevivalToken.Merge(m, src) 55 } 56 func (m *SessionRevivalToken) XXX_Size() int { 57 return m.Size() 58 } 59 func (m *SessionRevivalToken) XXX_DiscardUnknown() { 60 xxx_messageInfo_SessionRevivalToken.DiscardUnknown(m) 61 } 62 63 var xxx_messageInfo_SessionRevivalToken proto.InternalMessageInfo 64 65 // Payload is defined as a separate type so that it’s easier to sign. 66 type SessionRevivalToken_Payload struct { 67 // The SQL user who can use this token to authenticate. 68 User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` 69 // The algorithm used to sign the payload. Can be either Ed25519 or RSA. 70 Algorithm string `protobuf:"bytes,2,opt,name=algorithm,proto3" json:"algorithm,omitempty"` 71 // The time that this token is no longer considered valid. 72 ExpiresAt *types.Timestamp `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` 73 // The time that this token was created. 74 IssuedAt *types.Timestamp `protobuf:"bytes,4,opt,name=issued_at,json=issuedAt,proto3" json:"issued_at,omitempty"` 75 } 76 77 func (m *SessionRevivalToken_Payload) Reset() { *m = SessionRevivalToken_Payload{} } 78 func (m *SessionRevivalToken_Payload) String() string { return proto.CompactTextString(m) } 79 func (*SessionRevivalToken_Payload) ProtoMessage() {} 80 func (*SessionRevivalToken_Payload) Descriptor() ([]byte, []int) { 81 return fileDescriptor_12138428403833e1, []int{0, 0} 82 } 83 func (m *SessionRevivalToken_Payload) XXX_Unmarshal(b []byte) error { 84 return m.Unmarshal(b) 85 } 86 func (m *SessionRevivalToken_Payload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 87 b = b[:cap(b)] 88 n, err := m.MarshalToSizedBuffer(b) 89 if err != nil { 90 return nil, err 91 } 92 return b[:n], nil 93 } 94 func (m *SessionRevivalToken_Payload) XXX_Merge(src proto.Message) { 95 xxx_messageInfo_SessionRevivalToken_Payload.Merge(m, src) 96 } 97 func (m *SessionRevivalToken_Payload) XXX_Size() int { 98 return m.Size() 99 } 100 func (m *SessionRevivalToken_Payload) XXX_DiscardUnknown() { 101 xxx_messageInfo_SessionRevivalToken_Payload.DiscardUnknown(m) 102 } 103 104 var xxx_messageInfo_SessionRevivalToken_Payload proto.InternalMessageInfo 105 106 func init() { 107 proto.RegisterType((*SessionRevivalToken)(nil), "cockroach.parser.sql.sessiondatapb.SessionRevivalToken") 108 proto.RegisterType((*SessionRevivalToken_Payload)(nil), "cockroach.parser.sql.sessiondatapb.SessionRevivalToken.Payload") 109 } 110 111 func init() { 112 proto.RegisterFile("sql/sessiondatapb/session_revival_token.proto", fileDescriptor_12138428403833e1) 113 } 114 115 var fileDescriptor_12138428403833e1 = []byte{ 116 // 317 bytes of a gzipped FileDescriptorProto 117 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0x31, 0x4e, 0xf3, 0x30, 118 0x1c, 0xc5, 0xe3, 0xef, 0xab, 0x28, 0x31, 0x4c, 0x61, 0x89, 0x0a, 0x32, 0x15, 0x53, 0x17, 0x6c, 119 0x09, 0x24, 0x10, 0x63, 0x39, 0x01, 0x0a, 0x1d, 0x10, 0x4b, 0xe5, 0x24, 0xc6, 0xb5, 0xea, 0xd4, 120 0xae, 0xed, 0x54, 0x70, 0x0b, 0x6e, 0xc2, 0x35, 0x3a, 0x76, 0xec, 0x08, 0xe9, 0x41, 0x40, 0x75, 121 0x1a, 0x22, 0xc4, 0xc0, 0xf6, 0xff, 0x3f, 0xbf, 0xdf, 0xb3, 0x9e, 0x0d, 0xcf, 0xed, 0x5c, 0x12, 122 0xcb, 0xac, 0x15, 0x6a, 0x96, 0x53, 0x47, 0x75, 0xda, 0x6c, 0x63, 0xc3, 0x16, 0x62, 0x41, 0xe5, 123 0xd8, 0xa9, 0x29, 0x9b, 0x61, 0x6d, 0x94, 0x53, 0xd1, 0x71, 0xa6, 0xb2, 0xa9, 0x51, 0x34, 0x9b, 124 0x60, 0x3b, 0x97, 0xf8, 0x07, 0xd8, 0x3b, 0xe5, 0x4a, 0x71, 0xc9, 0x88, 0xb7, 0xa6, 0xe5, 0x13, 125 0x71, 0xa2, 0x60, 0xd6, 0xd1, 0x42, 0xd7, 0xf4, 0xd9, 0x27, 0x80, 0x47, 0xf7, 0x35, 0x92, 0xd4, 126 0xe1, 0xa3, 0x6d, 0x76, 0x14, 0xc3, 0xae, 0xa6, 0x2f, 0x52, 0xd1, 0x3c, 0x06, 0x7d, 0x30, 0x38, 127 0x4c, 0x9a, 0x35, 0x3a, 0x81, 0xa1, 0x15, 0x7c, 0x46, 0x5d, 0x69, 0x58, 0xfc, 0xcf, 0x9f, 0xb5, 128 0x42, 0xef, 0x0d, 0xc0, 0xee, 0xdd, 0xce, 0x19, 0xc1, 0x4e, 0x69, 0x99, 0xf1, 0x01, 0x61, 0xe2, 129 0xe7, 0x2d, 0x4d, 0x25, 0x57, 0x46, 0xb8, 0x49, 0xe1, 0xe9, 0x30, 0x69, 0x85, 0xe8, 0x06, 0x42, 130 0xf6, 0xac, 0x85, 0x61, 0x76, 0x4c, 0x5d, 0xfc, 0xbf, 0x0f, 0x06, 0x07, 0x17, 0x3d, 0x5c, 0x77, 131 0xc0, 0x4d, 0x07, 0x3c, 0x6a, 0x3a, 0x24, 0xe1, 0xce, 0x3d, 0x74, 0xd1, 0x35, 0x0c, 0x85, 0xb5, 132 0x25, 0xcb, 0xb7, 0x64, 0xe7, 0x4f, 0x72, 0xbf, 0x36, 0x0f, 0xdd, 0xed, 0xc3, 0xf2, 0x03, 0x05, 133 0xcb, 0x0a, 0x81, 0x55, 0x85, 0xc0, 0xba, 0x42, 0xe0, 0xbd, 0x42, 0xe0, 0x75, 0x83, 0x82, 0xd5, 134 0x06, 0x05, 0xeb, 0x0d, 0x0a, 0x1e, 0xaf, 0xb8, 0x70, 0x93, 0x32, 0xc5, 0x99, 0x2a, 0xc8, 0xf7, 135 0x63, 0xe7, 0x69, 0x3b, 0x13, 0x3d, 0xe5, 0xe4, 0xd7, 0xaf, 0xa5, 0x7b, 0xfe, 0xde, 0xcb, 0xaf, 136 0x00, 0x00, 0x00, 0xff, 0xff, 0x58, 0x75, 0xe7, 0xc2, 0xd1, 0x01, 0x00, 0x00, 137 } 138 139 func (m *SessionRevivalToken) Marshal() (dAtA []byte, err error) { 140 size := m.Size() 141 dAtA = make([]byte, size) 142 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 143 if err != nil { 144 return nil, err 145 } 146 return dAtA[:n], nil 147 } 148 149 func (m *SessionRevivalToken) MarshalTo(dAtA []byte) (int, error) { 150 size := m.Size() 151 return m.MarshalToSizedBuffer(dAtA[:size]) 152 } 153 154 func (m *SessionRevivalToken) MarshalToSizedBuffer(dAtA []byte) (int, error) { 155 i := len(dAtA) 156 _ = i 157 var l int 158 _ = l 159 if len(m.Signature) > 0 { 160 i -= len(m.Signature) 161 copy(dAtA[i:], m.Signature) 162 i = encodeVarintSessionRevivalToken(dAtA, i, uint64(len(m.Signature))) 163 i-- 164 dAtA[i] = 0x12 165 } 166 if len(m.Payload) > 0 { 167 i -= len(m.Payload) 168 copy(dAtA[i:], m.Payload) 169 i = encodeVarintSessionRevivalToken(dAtA, i, uint64(len(m.Payload))) 170 i-- 171 dAtA[i] = 0xa 172 } 173 return len(dAtA) - i, nil 174 } 175 176 func (m *SessionRevivalToken_Payload) Marshal() (dAtA []byte, err error) { 177 size := m.Size() 178 dAtA = make([]byte, size) 179 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 180 if err != nil { 181 return nil, err 182 } 183 return dAtA[:n], nil 184 } 185 186 func (m *SessionRevivalToken_Payload) MarshalTo(dAtA []byte) (int, error) { 187 size := m.Size() 188 return m.MarshalToSizedBuffer(dAtA[:size]) 189 } 190 191 func (m *SessionRevivalToken_Payload) MarshalToSizedBuffer(dAtA []byte) (int, error) { 192 i := len(dAtA) 193 _ = i 194 var l int 195 _ = l 196 if m.IssuedAt != nil { 197 { 198 size, err := m.IssuedAt.MarshalToSizedBuffer(dAtA[:i]) 199 if err != nil { 200 return 0, err 201 } 202 i -= size 203 i = encodeVarintSessionRevivalToken(dAtA, i, uint64(size)) 204 } 205 i-- 206 dAtA[i] = 0x22 207 } 208 if m.ExpiresAt != nil { 209 { 210 size, err := m.ExpiresAt.MarshalToSizedBuffer(dAtA[:i]) 211 if err != nil { 212 return 0, err 213 } 214 i -= size 215 i = encodeVarintSessionRevivalToken(dAtA, i, uint64(size)) 216 } 217 i-- 218 dAtA[i] = 0x1a 219 } 220 if len(m.Algorithm) > 0 { 221 i -= len(m.Algorithm) 222 copy(dAtA[i:], m.Algorithm) 223 i = encodeVarintSessionRevivalToken(dAtA, i, uint64(len(m.Algorithm))) 224 i-- 225 dAtA[i] = 0x12 226 } 227 if len(m.User) > 0 { 228 i -= len(m.User) 229 copy(dAtA[i:], m.User) 230 i = encodeVarintSessionRevivalToken(dAtA, i, uint64(len(m.User))) 231 i-- 232 dAtA[i] = 0xa 233 } 234 return len(dAtA) - i, nil 235 } 236 237 func encodeVarintSessionRevivalToken(dAtA []byte, offset int, v uint64) int { 238 offset -= sovSessionRevivalToken(v) 239 base := offset 240 for v >= 1<<7 { 241 dAtA[offset] = uint8(v&0x7f | 0x80) 242 v >>= 7 243 offset++ 244 } 245 dAtA[offset] = uint8(v) 246 return base 247 } 248 func (m *SessionRevivalToken) Size() (n int) { 249 if m == nil { 250 return 0 251 } 252 var l int 253 _ = l 254 l = len(m.Payload) 255 if l > 0 { 256 n += 1 + l + sovSessionRevivalToken(uint64(l)) 257 } 258 l = len(m.Signature) 259 if l > 0 { 260 n += 1 + l + sovSessionRevivalToken(uint64(l)) 261 } 262 return n 263 } 264 265 func (m *SessionRevivalToken_Payload) Size() (n int) { 266 if m == nil { 267 return 0 268 } 269 var l int 270 _ = l 271 l = len(m.User) 272 if l > 0 { 273 n += 1 + l + sovSessionRevivalToken(uint64(l)) 274 } 275 l = len(m.Algorithm) 276 if l > 0 { 277 n += 1 + l + sovSessionRevivalToken(uint64(l)) 278 } 279 if m.ExpiresAt != nil { 280 l = m.ExpiresAt.Size() 281 n += 1 + l + sovSessionRevivalToken(uint64(l)) 282 } 283 if m.IssuedAt != nil { 284 l = m.IssuedAt.Size() 285 n += 1 + l + sovSessionRevivalToken(uint64(l)) 286 } 287 return n 288 } 289 290 func sovSessionRevivalToken(x uint64) (n int) { 291 return (math_bits.Len64(x|1) + 6) / 7 292 } 293 func sozSessionRevivalToken(x uint64) (n int) { 294 return sovSessionRevivalToken(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 295 } 296 func (m *SessionRevivalToken) Unmarshal(dAtA []byte) error { 297 l := len(dAtA) 298 iNdEx := 0 299 for iNdEx < l { 300 preIndex := iNdEx 301 var wire uint64 302 for shift := uint(0); ; shift += 7 { 303 if shift >= 64 { 304 return ErrIntOverflowSessionRevivalToken 305 } 306 if iNdEx >= l { 307 return io.ErrUnexpectedEOF 308 } 309 b := dAtA[iNdEx] 310 iNdEx++ 311 wire |= uint64(b&0x7F) << shift 312 if b < 0x80 { 313 break 314 } 315 } 316 fieldNum := int32(wire >> 3) 317 wireType := int(wire & 0x7) 318 if wireType == 4 { 319 return fmt.Errorf("proto: SessionRevivalToken: wiretype end group for non-group") 320 } 321 if fieldNum <= 0 { 322 return fmt.Errorf("proto: SessionRevivalToken: illegal tag %d (wire type %d)", fieldNum, wire) 323 } 324 switch fieldNum { 325 case 1: 326 if wireType != 2 { 327 return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) 328 } 329 var byteLen int 330 for shift := uint(0); ; shift += 7 { 331 if shift >= 64 { 332 return ErrIntOverflowSessionRevivalToken 333 } 334 if iNdEx >= l { 335 return io.ErrUnexpectedEOF 336 } 337 b := dAtA[iNdEx] 338 iNdEx++ 339 byteLen |= int(b&0x7F) << shift 340 if b < 0x80 { 341 break 342 } 343 } 344 if byteLen < 0 { 345 return ErrInvalidLengthSessionRevivalToken 346 } 347 postIndex := iNdEx + byteLen 348 if postIndex < 0 { 349 return ErrInvalidLengthSessionRevivalToken 350 } 351 if postIndex > l { 352 return io.ErrUnexpectedEOF 353 } 354 m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) 355 if m.Payload == nil { 356 m.Payload = []byte{} 357 } 358 iNdEx = postIndex 359 case 2: 360 if wireType != 2 { 361 return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) 362 } 363 var byteLen int 364 for shift := uint(0); ; shift += 7 { 365 if shift >= 64 { 366 return ErrIntOverflowSessionRevivalToken 367 } 368 if iNdEx >= l { 369 return io.ErrUnexpectedEOF 370 } 371 b := dAtA[iNdEx] 372 iNdEx++ 373 byteLen |= int(b&0x7F) << shift 374 if b < 0x80 { 375 break 376 } 377 } 378 if byteLen < 0 { 379 return ErrInvalidLengthSessionRevivalToken 380 } 381 postIndex := iNdEx + byteLen 382 if postIndex < 0 { 383 return ErrInvalidLengthSessionRevivalToken 384 } 385 if postIndex > l { 386 return io.ErrUnexpectedEOF 387 } 388 m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) 389 if m.Signature == nil { 390 m.Signature = []byte{} 391 } 392 iNdEx = postIndex 393 default: 394 iNdEx = preIndex 395 skippy, err := skipSessionRevivalToken(dAtA[iNdEx:]) 396 if err != nil { 397 return err 398 } 399 if (skippy < 0) || (iNdEx+skippy) < 0 { 400 return ErrInvalidLengthSessionRevivalToken 401 } 402 if (iNdEx + skippy) > l { 403 return io.ErrUnexpectedEOF 404 } 405 iNdEx += skippy 406 } 407 } 408 409 if iNdEx > l { 410 return io.ErrUnexpectedEOF 411 } 412 return nil 413 } 414 func (m *SessionRevivalToken_Payload) Unmarshal(dAtA []byte) error { 415 l := len(dAtA) 416 iNdEx := 0 417 for iNdEx < l { 418 preIndex := iNdEx 419 var wire uint64 420 for shift := uint(0); ; shift += 7 { 421 if shift >= 64 { 422 return ErrIntOverflowSessionRevivalToken 423 } 424 if iNdEx >= l { 425 return io.ErrUnexpectedEOF 426 } 427 b := dAtA[iNdEx] 428 iNdEx++ 429 wire |= uint64(b&0x7F) << shift 430 if b < 0x80 { 431 break 432 } 433 } 434 fieldNum := int32(wire >> 3) 435 wireType := int(wire & 0x7) 436 if wireType == 4 { 437 return fmt.Errorf("proto: Payload: wiretype end group for non-group") 438 } 439 if fieldNum <= 0 { 440 return fmt.Errorf("proto: Payload: illegal tag %d (wire type %d)", fieldNum, wire) 441 } 442 switch fieldNum { 443 case 1: 444 if wireType != 2 { 445 return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) 446 } 447 var stringLen uint64 448 for shift := uint(0); ; shift += 7 { 449 if shift >= 64 { 450 return ErrIntOverflowSessionRevivalToken 451 } 452 if iNdEx >= l { 453 return io.ErrUnexpectedEOF 454 } 455 b := dAtA[iNdEx] 456 iNdEx++ 457 stringLen |= uint64(b&0x7F) << shift 458 if b < 0x80 { 459 break 460 } 461 } 462 intStringLen := int(stringLen) 463 if intStringLen < 0 { 464 return ErrInvalidLengthSessionRevivalToken 465 } 466 postIndex := iNdEx + intStringLen 467 if postIndex < 0 { 468 return ErrInvalidLengthSessionRevivalToken 469 } 470 if postIndex > l { 471 return io.ErrUnexpectedEOF 472 } 473 m.User = string(dAtA[iNdEx:postIndex]) 474 iNdEx = postIndex 475 case 2: 476 if wireType != 2 { 477 return fmt.Errorf("proto: wrong wireType = %d for field Algorithm", wireType) 478 } 479 var stringLen uint64 480 for shift := uint(0); ; shift += 7 { 481 if shift >= 64 { 482 return ErrIntOverflowSessionRevivalToken 483 } 484 if iNdEx >= l { 485 return io.ErrUnexpectedEOF 486 } 487 b := dAtA[iNdEx] 488 iNdEx++ 489 stringLen |= uint64(b&0x7F) << shift 490 if b < 0x80 { 491 break 492 } 493 } 494 intStringLen := int(stringLen) 495 if intStringLen < 0 { 496 return ErrInvalidLengthSessionRevivalToken 497 } 498 postIndex := iNdEx + intStringLen 499 if postIndex < 0 { 500 return ErrInvalidLengthSessionRevivalToken 501 } 502 if postIndex > l { 503 return io.ErrUnexpectedEOF 504 } 505 m.Algorithm = string(dAtA[iNdEx:postIndex]) 506 iNdEx = postIndex 507 case 3: 508 if wireType != 2 { 509 return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType) 510 } 511 var msglen int 512 for shift := uint(0); ; shift += 7 { 513 if shift >= 64 { 514 return ErrIntOverflowSessionRevivalToken 515 } 516 if iNdEx >= l { 517 return io.ErrUnexpectedEOF 518 } 519 b := dAtA[iNdEx] 520 iNdEx++ 521 msglen |= int(b&0x7F) << shift 522 if b < 0x80 { 523 break 524 } 525 } 526 if msglen < 0 { 527 return ErrInvalidLengthSessionRevivalToken 528 } 529 postIndex := iNdEx + msglen 530 if postIndex < 0 { 531 return ErrInvalidLengthSessionRevivalToken 532 } 533 if postIndex > l { 534 return io.ErrUnexpectedEOF 535 } 536 if m.ExpiresAt == nil { 537 m.ExpiresAt = &types.Timestamp{} 538 } 539 if err := m.ExpiresAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 540 return err 541 } 542 iNdEx = postIndex 543 case 4: 544 if wireType != 2 { 545 return fmt.Errorf("proto: wrong wireType = %d for field IssuedAt", wireType) 546 } 547 var msglen int 548 for shift := uint(0); ; shift += 7 { 549 if shift >= 64 { 550 return ErrIntOverflowSessionRevivalToken 551 } 552 if iNdEx >= l { 553 return io.ErrUnexpectedEOF 554 } 555 b := dAtA[iNdEx] 556 iNdEx++ 557 msglen |= int(b&0x7F) << shift 558 if b < 0x80 { 559 break 560 } 561 } 562 if msglen < 0 { 563 return ErrInvalidLengthSessionRevivalToken 564 } 565 postIndex := iNdEx + msglen 566 if postIndex < 0 { 567 return ErrInvalidLengthSessionRevivalToken 568 } 569 if postIndex > l { 570 return io.ErrUnexpectedEOF 571 } 572 if m.IssuedAt == nil { 573 m.IssuedAt = &types.Timestamp{} 574 } 575 if err := m.IssuedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 576 return err 577 } 578 iNdEx = postIndex 579 default: 580 iNdEx = preIndex 581 skippy, err := skipSessionRevivalToken(dAtA[iNdEx:]) 582 if err != nil { 583 return err 584 } 585 if (skippy < 0) || (iNdEx+skippy) < 0 { 586 return ErrInvalidLengthSessionRevivalToken 587 } 588 if (iNdEx + skippy) > l { 589 return io.ErrUnexpectedEOF 590 } 591 iNdEx += skippy 592 } 593 } 594 595 if iNdEx > l { 596 return io.ErrUnexpectedEOF 597 } 598 return nil 599 } 600 func skipSessionRevivalToken(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, ErrIntOverflowSessionRevivalToken 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, ErrIntOverflowSessionRevivalToken 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, ErrIntOverflowSessionRevivalToken 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, ErrInvalidLengthSessionRevivalToken 655 } 656 iNdEx += length 657 case 3: 658 depth++ 659 case 4: 660 if depth == 0 { 661 return 0, ErrUnexpectedEndOfGroupSessionRevivalToken 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, ErrInvalidLengthSessionRevivalToken 671 } 672 if depth == 0 { 673 return iNdEx, nil 674 } 675 } 676 return 0, io.ErrUnexpectedEOF 677 } 678 679 var ( 680 ErrInvalidLengthSessionRevivalToken = fmt.Errorf("proto: negative length found during unmarshaling") 681 ErrIntOverflowSessionRevivalToken = fmt.Errorf("proto: integer overflow") 682 ErrUnexpectedEndOfGroupSessionRevivalToken = fmt.Errorf("proto: unexpected end of group") 683 ) 684