github.com/thanos-io/thanos@v0.32.5/pkg/queryfrontend/response.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: queryfrontend/response.proto 3 4 package queryfrontend 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 labelpb "github.com/thanos-io/thanos/pkg/store/labelpb" 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 type ThanosLabelsResponse struct { 29 Status string `protobuf:"bytes,1,opt,name=Status,proto3" json:"status"` 30 Data []string `protobuf:"bytes,2,rep,name=Data,proto3" json:"data"` 31 ErrorType string `protobuf:"bytes,3,opt,name=ErrorType,proto3" json:"errorType,omitempty"` 32 Error string `protobuf:"bytes,4,opt,name=Error,proto3" json:"error,omitempty"` 33 Headers []*ResponseHeader `protobuf:"bytes,5,rep,name=Headers,proto3" json:"-"` 34 } 35 36 func (m *ThanosLabelsResponse) Reset() { *m = ThanosLabelsResponse{} } 37 func (m *ThanosLabelsResponse) String() string { return proto.CompactTextString(m) } 38 func (*ThanosLabelsResponse) ProtoMessage() {} 39 func (*ThanosLabelsResponse) Descriptor() ([]byte, []int) { 40 return fileDescriptor_b882fa7024d92f38, []int{0} 41 } 42 func (m *ThanosLabelsResponse) XXX_Unmarshal(b []byte) error { 43 return m.Unmarshal(b) 44 } 45 func (m *ThanosLabelsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 46 if deterministic { 47 return xxx_messageInfo_ThanosLabelsResponse.Marshal(b, m, deterministic) 48 } else { 49 b = b[:cap(b)] 50 n, err := m.MarshalToSizedBuffer(b) 51 if err != nil { 52 return nil, err 53 } 54 return b[:n], nil 55 } 56 } 57 func (m *ThanosLabelsResponse) XXX_Merge(src proto.Message) { 58 xxx_messageInfo_ThanosLabelsResponse.Merge(m, src) 59 } 60 func (m *ThanosLabelsResponse) XXX_Size() int { 61 return m.Size() 62 } 63 func (m *ThanosLabelsResponse) XXX_DiscardUnknown() { 64 xxx_messageInfo_ThanosLabelsResponse.DiscardUnknown(m) 65 } 66 67 var xxx_messageInfo_ThanosLabelsResponse proto.InternalMessageInfo 68 69 type ThanosSeriesResponse struct { 70 Status string `protobuf:"bytes,1,opt,name=Status,proto3" json:"status"` 71 Data []labelpb.ZLabelSet `protobuf:"bytes,2,rep,name=Data,proto3" json:"data"` 72 ErrorType string `protobuf:"bytes,3,opt,name=ErrorType,proto3" json:"errorType,omitempty"` 73 Error string `protobuf:"bytes,4,opt,name=Error,proto3" json:"error,omitempty"` 74 Headers []*ResponseHeader `protobuf:"bytes,5,rep,name=Headers,proto3" json:"-"` 75 } 76 77 func (m *ThanosSeriesResponse) Reset() { *m = ThanosSeriesResponse{} } 78 func (m *ThanosSeriesResponse) String() string { return proto.CompactTextString(m) } 79 func (*ThanosSeriesResponse) ProtoMessage() {} 80 func (*ThanosSeriesResponse) Descriptor() ([]byte, []int) { 81 return fileDescriptor_b882fa7024d92f38, []int{1} 82 } 83 func (m *ThanosSeriesResponse) XXX_Unmarshal(b []byte) error { 84 return m.Unmarshal(b) 85 } 86 func (m *ThanosSeriesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 87 if deterministic { 88 return xxx_messageInfo_ThanosSeriesResponse.Marshal(b, m, deterministic) 89 } else { 90 b = b[:cap(b)] 91 n, err := m.MarshalToSizedBuffer(b) 92 if err != nil { 93 return nil, err 94 } 95 return b[:n], nil 96 } 97 } 98 func (m *ThanosSeriesResponse) XXX_Merge(src proto.Message) { 99 xxx_messageInfo_ThanosSeriesResponse.Merge(m, src) 100 } 101 func (m *ThanosSeriesResponse) XXX_Size() int { 102 return m.Size() 103 } 104 func (m *ThanosSeriesResponse) XXX_DiscardUnknown() { 105 xxx_messageInfo_ThanosSeriesResponse.DiscardUnknown(m) 106 } 107 108 var xxx_messageInfo_ThanosSeriesResponse proto.InternalMessageInfo 109 110 type ResponseHeader struct { 111 Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"-"` 112 Values []string `protobuf:"bytes,2,rep,name=Values,proto3" json:"-"` 113 } 114 115 func (m *ResponseHeader) Reset() { *m = ResponseHeader{} } 116 func (m *ResponseHeader) String() string { return proto.CompactTextString(m) } 117 func (*ResponseHeader) ProtoMessage() {} 118 func (*ResponseHeader) Descriptor() ([]byte, []int) { 119 return fileDescriptor_b882fa7024d92f38, []int{2} 120 } 121 func (m *ResponseHeader) XXX_Unmarshal(b []byte) error { 122 return m.Unmarshal(b) 123 } 124 func (m *ResponseHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 125 if deterministic { 126 return xxx_messageInfo_ResponseHeader.Marshal(b, m, deterministic) 127 } else { 128 b = b[:cap(b)] 129 n, err := m.MarshalToSizedBuffer(b) 130 if err != nil { 131 return nil, err 132 } 133 return b[:n], nil 134 } 135 } 136 func (m *ResponseHeader) XXX_Merge(src proto.Message) { 137 xxx_messageInfo_ResponseHeader.Merge(m, src) 138 } 139 func (m *ResponseHeader) XXX_Size() int { 140 return m.Size() 141 } 142 func (m *ResponseHeader) XXX_DiscardUnknown() { 143 xxx_messageInfo_ResponseHeader.DiscardUnknown(m) 144 } 145 146 var xxx_messageInfo_ResponseHeader proto.InternalMessageInfo 147 148 func init() { 149 proto.RegisterType((*ThanosLabelsResponse)(nil), "queryfrontend.ThanosLabelsResponse") 150 proto.RegisterType((*ThanosSeriesResponse)(nil), "queryfrontend.ThanosSeriesResponse") 151 proto.RegisterType((*ResponseHeader)(nil), "queryfrontend.ResponseHeader") 152 } 153 154 func init() { proto.RegisterFile("queryfrontend/response.proto", fileDescriptor_b882fa7024d92f38) } 155 156 var fileDescriptor_b882fa7024d92f38 = []byte{ 157 // 367 bytes of a gzipped FileDescriptorProto 158 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x92, 0x41, 0x4f, 0xea, 0x40, 159 0x14, 0x85, 0x5b, 0x28, 0x7d, 0x8f, 0xe1, 0x3d, 0x8d, 0x03, 0x89, 0x85, 0x40, 0x4b, 0x58, 0x61, 160 0xa2, 0x6d, 0x02, 0x71, 0xeb, 0xa2, 0xd1, 0xc4, 0x18, 0xe3, 0xa2, 0x10, 0x17, 0xee, 0x86, 0x70, 161 0x45, 0x12, 0xe8, 0xd4, 0x99, 0x61, 0xd1, 0x7f, 0xa1, 0xff, 0x8a, 0x25, 0x4b, 0x57, 0x8d, 0xc2, 162 0xae, 0x3f, 0xc1, 0x95, 0x61, 0x3a, 0x8d, 0xb0, 0x74, 0xe9, 0x6e, 0xe6, 0x9c, 0xef, 0xde, 0xe4, 163 0x9c, 0x5c, 0xd4, 0x7c, 0x5e, 0x00, 0x8b, 0x1f, 0x19, 0x0d, 0x05, 0x84, 0x63, 0x8f, 0x01, 0x8f, 164 0x68, 0xc8, 0xc1, 0x8d, 0x18, 0x15, 0x14, 0xff, 0xdf, 0x73, 0x1b, 0xb5, 0x09, 0x9d, 0x50, 0xe9, 165 0x78, 0xdb, 0x57, 0x06, 0x35, 0xea, 0x5c, 0x50, 0x06, 0xde, 0x8c, 0x8c, 0x60, 0x16, 0x8d, 0x3c, 166 0x11, 0x47, 0xc0, 0x33, 0xab, 0xf3, 0xa9, 0xa3, 0xda, 0xf0, 0x89, 0x84, 0x94, 0xdf, 0x6e, 0x5d, 167 0x1e, 0xa8, 0xf5, 0xb8, 0x83, 0xcc, 0x81, 0x20, 0x62, 0xc1, 0x2d, 0xbd, 0xad, 0x77, 0xcb, 0x3e, 168 0x4a, 0x13, 0xc7, 0xe4, 0x52, 0x09, 0x94, 0x83, 0x9b, 0xc8, 0xb8, 0x24, 0x82, 0x58, 0x85, 0x76, 169 0xb1, 0x5b, 0xf6, 0xff, 0xa6, 0x89, 0x63, 0x8c, 0x89, 0x20, 0x81, 0x54, 0xf1, 0x39, 0x2a, 0x5f, 170 0x31, 0x46, 0xd9, 0x30, 0x8e, 0xc0, 0x2a, 0xca, 0x25, 0xc7, 0x69, 0xe2, 0x54, 0x21, 0x17, 0x4f, 171 0xe9, 0x7c, 0x2a, 0x60, 0x1e, 0x89, 0x38, 0xf8, 0x26, 0xf1, 0x09, 0x2a, 0xc9, 0x8f, 0x65, 0xc8, 172 0x91, 0x6a, 0x9a, 0x38, 0x87, 0x72, 0x64, 0x07, 0xcf, 0x08, 0x7c, 0x81, 0xfe, 0x5c, 0x03, 0x19, 173 0x03, 0xe3, 0x56, 0xa9, 0x5d, 0xec, 0x56, 0x7a, 0x2d, 0x77, 0xaf, 0x0e, 0x37, 0x4f, 0x93, 0x51, 174 0x7e, 0x29, 0x4d, 0x1c, 0xfd, 0x2c, 0xc8, 0x87, 0x3a, 0xaf, 0x85, 0x3c, 0xfc, 0x00, 0xd8, 0x14, 175 0x7e, 0x16, 0xbe, 0xbf, 0x13, 0xbe, 0xd2, 0x3b, 0x72, 0x85, 0x5c, 0xe4, 0x3e, 0xc8, 0x1e, 0x07, 176 0x20, 0xfc, 0x7f, 0xcb, 0xc4, 0xd1, 0x7e, 0x5d, 0x27, 0x37, 0xe8, 0x60, 0x9f, 0xc0, 0x75, 0x64, 177 0xdc, 0x91, 0x39, 0xa8, 0x2a, 0x14, 0x2f, 0x25, 0xdc, 0x42, 0xe6, 0x3d, 0x99, 0x2d, 0x80, 0xab, 178 0x13, 0x50, 0xa6, 0x12, 0xfd, 0xe6, 0xf2, 0xc3, 0xd6, 0x96, 0x6b, 0x5b, 0x5f, 0xad, 0x6d, 0xfd, 179 0x7d, 0x6d, 0xeb, 0x2f, 0x1b, 0x5b, 0x5b, 0x6d, 0x6c, 0xed, 0x6d, 0x63, 0x6b, 0x23, 0x53, 0x5e, 180 0x60, 0xff, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x6d, 0x4c, 0xcd, 0xdf, 0xe1, 0x02, 0x00, 0x00, 181 } 182 183 func (m *ThanosLabelsResponse) Marshal() (dAtA []byte, err error) { 184 size := m.Size() 185 dAtA = make([]byte, size) 186 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 187 if err != nil { 188 return nil, err 189 } 190 return dAtA[:n], nil 191 } 192 193 func (m *ThanosLabelsResponse) MarshalTo(dAtA []byte) (int, error) { 194 size := m.Size() 195 return m.MarshalToSizedBuffer(dAtA[:size]) 196 } 197 198 func (m *ThanosLabelsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 199 i := len(dAtA) 200 _ = i 201 var l int 202 _ = l 203 if len(m.Headers) > 0 { 204 for iNdEx := len(m.Headers) - 1; iNdEx >= 0; iNdEx-- { 205 { 206 size, err := m.Headers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 207 if err != nil { 208 return 0, err 209 } 210 i -= size 211 i = encodeVarintResponse(dAtA, i, uint64(size)) 212 } 213 i-- 214 dAtA[i] = 0x2a 215 } 216 } 217 if len(m.Error) > 0 { 218 i -= len(m.Error) 219 copy(dAtA[i:], m.Error) 220 i = encodeVarintResponse(dAtA, i, uint64(len(m.Error))) 221 i-- 222 dAtA[i] = 0x22 223 } 224 if len(m.ErrorType) > 0 { 225 i -= len(m.ErrorType) 226 copy(dAtA[i:], m.ErrorType) 227 i = encodeVarintResponse(dAtA, i, uint64(len(m.ErrorType))) 228 i-- 229 dAtA[i] = 0x1a 230 } 231 if len(m.Data) > 0 { 232 for iNdEx := len(m.Data) - 1; iNdEx >= 0; iNdEx-- { 233 i -= len(m.Data[iNdEx]) 234 copy(dAtA[i:], m.Data[iNdEx]) 235 i = encodeVarintResponse(dAtA, i, uint64(len(m.Data[iNdEx]))) 236 i-- 237 dAtA[i] = 0x12 238 } 239 } 240 if len(m.Status) > 0 { 241 i -= len(m.Status) 242 copy(dAtA[i:], m.Status) 243 i = encodeVarintResponse(dAtA, i, uint64(len(m.Status))) 244 i-- 245 dAtA[i] = 0xa 246 } 247 return len(dAtA) - i, nil 248 } 249 250 func (m *ThanosSeriesResponse) Marshal() (dAtA []byte, err error) { 251 size := m.Size() 252 dAtA = make([]byte, size) 253 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 254 if err != nil { 255 return nil, err 256 } 257 return dAtA[:n], nil 258 } 259 260 func (m *ThanosSeriesResponse) MarshalTo(dAtA []byte) (int, error) { 261 size := m.Size() 262 return m.MarshalToSizedBuffer(dAtA[:size]) 263 } 264 265 func (m *ThanosSeriesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 266 i := len(dAtA) 267 _ = i 268 var l int 269 _ = l 270 if len(m.Headers) > 0 { 271 for iNdEx := len(m.Headers) - 1; iNdEx >= 0; iNdEx-- { 272 { 273 size, err := m.Headers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 274 if err != nil { 275 return 0, err 276 } 277 i -= size 278 i = encodeVarintResponse(dAtA, i, uint64(size)) 279 } 280 i-- 281 dAtA[i] = 0x2a 282 } 283 } 284 if len(m.Error) > 0 { 285 i -= len(m.Error) 286 copy(dAtA[i:], m.Error) 287 i = encodeVarintResponse(dAtA, i, uint64(len(m.Error))) 288 i-- 289 dAtA[i] = 0x22 290 } 291 if len(m.ErrorType) > 0 { 292 i -= len(m.ErrorType) 293 copy(dAtA[i:], m.ErrorType) 294 i = encodeVarintResponse(dAtA, i, uint64(len(m.ErrorType))) 295 i-- 296 dAtA[i] = 0x1a 297 } 298 if len(m.Data) > 0 { 299 for iNdEx := len(m.Data) - 1; iNdEx >= 0; iNdEx-- { 300 { 301 size, err := m.Data[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 302 if err != nil { 303 return 0, err 304 } 305 i -= size 306 i = encodeVarintResponse(dAtA, i, uint64(size)) 307 } 308 i-- 309 dAtA[i] = 0x12 310 } 311 } 312 if len(m.Status) > 0 { 313 i -= len(m.Status) 314 copy(dAtA[i:], m.Status) 315 i = encodeVarintResponse(dAtA, i, uint64(len(m.Status))) 316 i-- 317 dAtA[i] = 0xa 318 } 319 return len(dAtA) - i, nil 320 } 321 322 func (m *ResponseHeader) Marshal() (dAtA []byte, err error) { 323 size := m.Size() 324 dAtA = make([]byte, size) 325 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 326 if err != nil { 327 return nil, err 328 } 329 return dAtA[:n], nil 330 } 331 332 func (m *ResponseHeader) MarshalTo(dAtA []byte) (int, error) { 333 size := m.Size() 334 return m.MarshalToSizedBuffer(dAtA[:size]) 335 } 336 337 func (m *ResponseHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { 338 i := len(dAtA) 339 _ = i 340 var l int 341 _ = l 342 if len(m.Values) > 0 { 343 for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { 344 i -= len(m.Values[iNdEx]) 345 copy(dAtA[i:], m.Values[iNdEx]) 346 i = encodeVarintResponse(dAtA, i, uint64(len(m.Values[iNdEx]))) 347 i-- 348 dAtA[i] = 0x12 349 } 350 } 351 if len(m.Name) > 0 { 352 i -= len(m.Name) 353 copy(dAtA[i:], m.Name) 354 i = encodeVarintResponse(dAtA, i, uint64(len(m.Name))) 355 i-- 356 dAtA[i] = 0xa 357 } 358 return len(dAtA) - i, nil 359 } 360 361 func encodeVarintResponse(dAtA []byte, offset int, v uint64) int { 362 offset -= sovResponse(v) 363 base := offset 364 for v >= 1<<7 { 365 dAtA[offset] = uint8(v&0x7f | 0x80) 366 v >>= 7 367 offset++ 368 } 369 dAtA[offset] = uint8(v) 370 return base 371 } 372 func (m *ThanosLabelsResponse) Size() (n int) { 373 if m == nil { 374 return 0 375 } 376 var l int 377 _ = l 378 l = len(m.Status) 379 if l > 0 { 380 n += 1 + l + sovResponse(uint64(l)) 381 } 382 if len(m.Data) > 0 { 383 for _, s := range m.Data { 384 l = len(s) 385 n += 1 + l + sovResponse(uint64(l)) 386 } 387 } 388 l = len(m.ErrorType) 389 if l > 0 { 390 n += 1 + l + sovResponse(uint64(l)) 391 } 392 l = len(m.Error) 393 if l > 0 { 394 n += 1 + l + sovResponse(uint64(l)) 395 } 396 if len(m.Headers) > 0 { 397 for _, e := range m.Headers { 398 l = e.Size() 399 n += 1 + l + sovResponse(uint64(l)) 400 } 401 } 402 return n 403 } 404 405 func (m *ThanosSeriesResponse) Size() (n int) { 406 if m == nil { 407 return 0 408 } 409 var l int 410 _ = l 411 l = len(m.Status) 412 if l > 0 { 413 n += 1 + l + sovResponse(uint64(l)) 414 } 415 if len(m.Data) > 0 { 416 for _, e := range m.Data { 417 l = e.Size() 418 n += 1 + l + sovResponse(uint64(l)) 419 } 420 } 421 l = len(m.ErrorType) 422 if l > 0 { 423 n += 1 + l + sovResponse(uint64(l)) 424 } 425 l = len(m.Error) 426 if l > 0 { 427 n += 1 + l + sovResponse(uint64(l)) 428 } 429 if len(m.Headers) > 0 { 430 for _, e := range m.Headers { 431 l = e.Size() 432 n += 1 + l + sovResponse(uint64(l)) 433 } 434 } 435 return n 436 } 437 438 func (m *ResponseHeader) Size() (n int) { 439 if m == nil { 440 return 0 441 } 442 var l int 443 _ = l 444 l = len(m.Name) 445 if l > 0 { 446 n += 1 + l + sovResponse(uint64(l)) 447 } 448 if len(m.Values) > 0 { 449 for _, s := range m.Values { 450 l = len(s) 451 n += 1 + l + sovResponse(uint64(l)) 452 } 453 } 454 return n 455 } 456 457 func sovResponse(x uint64) (n int) { 458 return (math_bits.Len64(x|1) + 6) / 7 459 } 460 func sozResponse(x uint64) (n int) { 461 return sovResponse(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 462 } 463 func (m *ThanosLabelsResponse) Unmarshal(dAtA []byte) error { 464 l := len(dAtA) 465 iNdEx := 0 466 for iNdEx < l { 467 preIndex := iNdEx 468 var wire uint64 469 for shift := uint(0); ; shift += 7 { 470 if shift >= 64 { 471 return ErrIntOverflowResponse 472 } 473 if iNdEx >= l { 474 return io.ErrUnexpectedEOF 475 } 476 b := dAtA[iNdEx] 477 iNdEx++ 478 wire |= uint64(b&0x7F) << shift 479 if b < 0x80 { 480 break 481 } 482 } 483 fieldNum := int32(wire >> 3) 484 wireType := int(wire & 0x7) 485 if wireType == 4 { 486 return fmt.Errorf("proto: ThanosLabelsResponse: wiretype end group for non-group") 487 } 488 if fieldNum <= 0 { 489 return fmt.Errorf("proto: ThanosLabelsResponse: illegal tag %d (wire type %d)", fieldNum, wire) 490 } 491 switch fieldNum { 492 case 1: 493 if wireType != 2 { 494 return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) 495 } 496 var stringLen uint64 497 for shift := uint(0); ; shift += 7 { 498 if shift >= 64 { 499 return ErrIntOverflowResponse 500 } 501 if iNdEx >= l { 502 return io.ErrUnexpectedEOF 503 } 504 b := dAtA[iNdEx] 505 iNdEx++ 506 stringLen |= uint64(b&0x7F) << shift 507 if b < 0x80 { 508 break 509 } 510 } 511 intStringLen := int(stringLen) 512 if intStringLen < 0 { 513 return ErrInvalidLengthResponse 514 } 515 postIndex := iNdEx + intStringLen 516 if postIndex < 0 { 517 return ErrInvalidLengthResponse 518 } 519 if postIndex > l { 520 return io.ErrUnexpectedEOF 521 } 522 m.Status = string(dAtA[iNdEx:postIndex]) 523 iNdEx = postIndex 524 case 2: 525 if wireType != 2 { 526 return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) 527 } 528 var stringLen uint64 529 for shift := uint(0); ; shift += 7 { 530 if shift >= 64 { 531 return ErrIntOverflowResponse 532 } 533 if iNdEx >= l { 534 return io.ErrUnexpectedEOF 535 } 536 b := dAtA[iNdEx] 537 iNdEx++ 538 stringLen |= uint64(b&0x7F) << shift 539 if b < 0x80 { 540 break 541 } 542 } 543 intStringLen := int(stringLen) 544 if intStringLen < 0 { 545 return ErrInvalidLengthResponse 546 } 547 postIndex := iNdEx + intStringLen 548 if postIndex < 0 { 549 return ErrInvalidLengthResponse 550 } 551 if postIndex > l { 552 return io.ErrUnexpectedEOF 553 } 554 m.Data = append(m.Data, string(dAtA[iNdEx:postIndex])) 555 iNdEx = postIndex 556 case 3: 557 if wireType != 2 { 558 return fmt.Errorf("proto: wrong wireType = %d for field ErrorType", wireType) 559 } 560 var stringLen uint64 561 for shift := uint(0); ; shift += 7 { 562 if shift >= 64 { 563 return ErrIntOverflowResponse 564 } 565 if iNdEx >= l { 566 return io.ErrUnexpectedEOF 567 } 568 b := dAtA[iNdEx] 569 iNdEx++ 570 stringLen |= uint64(b&0x7F) << shift 571 if b < 0x80 { 572 break 573 } 574 } 575 intStringLen := int(stringLen) 576 if intStringLen < 0 { 577 return ErrInvalidLengthResponse 578 } 579 postIndex := iNdEx + intStringLen 580 if postIndex < 0 { 581 return ErrInvalidLengthResponse 582 } 583 if postIndex > l { 584 return io.ErrUnexpectedEOF 585 } 586 m.ErrorType = string(dAtA[iNdEx:postIndex]) 587 iNdEx = postIndex 588 case 4: 589 if wireType != 2 { 590 return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) 591 } 592 var stringLen uint64 593 for shift := uint(0); ; shift += 7 { 594 if shift >= 64 { 595 return ErrIntOverflowResponse 596 } 597 if iNdEx >= l { 598 return io.ErrUnexpectedEOF 599 } 600 b := dAtA[iNdEx] 601 iNdEx++ 602 stringLen |= uint64(b&0x7F) << shift 603 if b < 0x80 { 604 break 605 } 606 } 607 intStringLen := int(stringLen) 608 if intStringLen < 0 { 609 return ErrInvalidLengthResponse 610 } 611 postIndex := iNdEx + intStringLen 612 if postIndex < 0 { 613 return ErrInvalidLengthResponse 614 } 615 if postIndex > l { 616 return io.ErrUnexpectedEOF 617 } 618 m.Error = string(dAtA[iNdEx:postIndex]) 619 iNdEx = postIndex 620 case 5: 621 if wireType != 2 { 622 return fmt.Errorf("proto: wrong wireType = %d for field Headers", wireType) 623 } 624 var msglen int 625 for shift := uint(0); ; shift += 7 { 626 if shift >= 64 { 627 return ErrIntOverflowResponse 628 } 629 if iNdEx >= l { 630 return io.ErrUnexpectedEOF 631 } 632 b := dAtA[iNdEx] 633 iNdEx++ 634 msglen |= int(b&0x7F) << shift 635 if b < 0x80 { 636 break 637 } 638 } 639 if msglen < 0 { 640 return ErrInvalidLengthResponse 641 } 642 postIndex := iNdEx + msglen 643 if postIndex < 0 { 644 return ErrInvalidLengthResponse 645 } 646 if postIndex > l { 647 return io.ErrUnexpectedEOF 648 } 649 m.Headers = append(m.Headers, &ResponseHeader{}) 650 if err := m.Headers[len(m.Headers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 651 return err 652 } 653 iNdEx = postIndex 654 default: 655 iNdEx = preIndex 656 skippy, err := skipResponse(dAtA[iNdEx:]) 657 if err != nil { 658 return err 659 } 660 if (skippy < 0) || (iNdEx+skippy) < 0 { 661 return ErrInvalidLengthResponse 662 } 663 if (iNdEx + skippy) > l { 664 return io.ErrUnexpectedEOF 665 } 666 iNdEx += skippy 667 } 668 } 669 670 if iNdEx > l { 671 return io.ErrUnexpectedEOF 672 } 673 return nil 674 } 675 func (m *ThanosSeriesResponse) Unmarshal(dAtA []byte) error { 676 l := len(dAtA) 677 iNdEx := 0 678 for iNdEx < l { 679 preIndex := iNdEx 680 var wire uint64 681 for shift := uint(0); ; shift += 7 { 682 if shift >= 64 { 683 return ErrIntOverflowResponse 684 } 685 if iNdEx >= l { 686 return io.ErrUnexpectedEOF 687 } 688 b := dAtA[iNdEx] 689 iNdEx++ 690 wire |= uint64(b&0x7F) << shift 691 if b < 0x80 { 692 break 693 } 694 } 695 fieldNum := int32(wire >> 3) 696 wireType := int(wire & 0x7) 697 if wireType == 4 { 698 return fmt.Errorf("proto: ThanosSeriesResponse: wiretype end group for non-group") 699 } 700 if fieldNum <= 0 { 701 return fmt.Errorf("proto: ThanosSeriesResponse: illegal tag %d (wire type %d)", fieldNum, wire) 702 } 703 switch fieldNum { 704 case 1: 705 if wireType != 2 { 706 return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) 707 } 708 var stringLen uint64 709 for shift := uint(0); ; shift += 7 { 710 if shift >= 64 { 711 return ErrIntOverflowResponse 712 } 713 if iNdEx >= l { 714 return io.ErrUnexpectedEOF 715 } 716 b := dAtA[iNdEx] 717 iNdEx++ 718 stringLen |= uint64(b&0x7F) << shift 719 if b < 0x80 { 720 break 721 } 722 } 723 intStringLen := int(stringLen) 724 if intStringLen < 0 { 725 return ErrInvalidLengthResponse 726 } 727 postIndex := iNdEx + intStringLen 728 if postIndex < 0 { 729 return ErrInvalidLengthResponse 730 } 731 if postIndex > l { 732 return io.ErrUnexpectedEOF 733 } 734 m.Status = string(dAtA[iNdEx:postIndex]) 735 iNdEx = postIndex 736 case 2: 737 if wireType != 2 { 738 return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) 739 } 740 var msglen int 741 for shift := uint(0); ; shift += 7 { 742 if shift >= 64 { 743 return ErrIntOverflowResponse 744 } 745 if iNdEx >= l { 746 return io.ErrUnexpectedEOF 747 } 748 b := dAtA[iNdEx] 749 iNdEx++ 750 msglen |= int(b&0x7F) << shift 751 if b < 0x80 { 752 break 753 } 754 } 755 if msglen < 0 { 756 return ErrInvalidLengthResponse 757 } 758 postIndex := iNdEx + msglen 759 if postIndex < 0 { 760 return ErrInvalidLengthResponse 761 } 762 if postIndex > l { 763 return io.ErrUnexpectedEOF 764 } 765 m.Data = append(m.Data, labelpb.ZLabelSet{}) 766 if err := m.Data[len(m.Data)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 767 return err 768 } 769 iNdEx = postIndex 770 case 3: 771 if wireType != 2 { 772 return fmt.Errorf("proto: wrong wireType = %d for field ErrorType", wireType) 773 } 774 var stringLen uint64 775 for shift := uint(0); ; shift += 7 { 776 if shift >= 64 { 777 return ErrIntOverflowResponse 778 } 779 if iNdEx >= l { 780 return io.ErrUnexpectedEOF 781 } 782 b := dAtA[iNdEx] 783 iNdEx++ 784 stringLen |= uint64(b&0x7F) << shift 785 if b < 0x80 { 786 break 787 } 788 } 789 intStringLen := int(stringLen) 790 if intStringLen < 0 { 791 return ErrInvalidLengthResponse 792 } 793 postIndex := iNdEx + intStringLen 794 if postIndex < 0 { 795 return ErrInvalidLengthResponse 796 } 797 if postIndex > l { 798 return io.ErrUnexpectedEOF 799 } 800 m.ErrorType = string(dAtA[iNdEx:postIndex]) 801 iNdEx = postIndex 802 case 4: 803 if wireType != 2 { 804 return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) 805 } 806 var stringLen uint64 807 for shift := uint(0); ; shift += 7 { 808 if shift >= 64 { 809 return ErrIntOverflowResponse 810 } 811 if iNdEx >= l { 812 return io.ErrUnexpectedEOF 813 } 814 b := dAtA[iNdEx] 815 iNdEx++ 816 stringLen |= uint64(b&0x7F) << shift 817 if b < 0x80 { 818 break 819 } 820 } 821 intStringLen := int(stringLen) 822 if intStringLen < 0 { 823 return ErrInvalidLengthResponse 824 } 825 postIndex := iNdEx + intStringLen 826 if postIndex < 0 { 827 return ErrInvalidLengthResponse 828 } 829 if postIndex > l { 830 return io.ErrUnexpectedEOF 831 } 832 m.Error = string(dAtA[iNdEx:postIndex]) 833 iNdEx = postIndex 834 case 5: 835 if wireType != 2 { 836 return fmt.Errorf("proto: wrong wireType = %d for field Headers", wireType) 837 } 838 var msglen int 839 for shift := uint(0); ; shift += 7 { 840 if shift >= 64 { 841 return ErrIntOverflowResponse 842 } 843 if iNdEx >= l { 844 return io.ErrUnexpectedEOF 845 } 846 b := dAtA[iNdEx] 847 iNdEx++ 848 msglen |= int(b&0x7F) << shift 849 if b < 0x80 { 850 break 851 } 852 } 853 if msglen < 0 { 854 return ErrInvalidLengthResponse 855 } 856 postIndex := iNdEx + msglen 857 if postIndex < 0 { 858 return ErrInvalidLengthResponse 859 } 860 if postIndex > l { 861 return io.ErrUnexpectedEOF 862 } 863 m.Headers = append(m.Headers, &ResponseHeader{}) 864 if err := m.Headers[len(m.Headers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 865 return err 866 } 867 iNdEx = postIndex 868 default: 869 iNdEx = preIndex 870 skippy, err := skipResponse(dAtA[iNdEx:]) 871 if err != nil { 872 return err 873 } 874 if (skippy < 0) || (iNdEx+skippy) < 0 { 875 return ErrInvalidLengthResponse 876 } 877 if (iNdEx + skippy) > l { 878 return io.ErrUnexpectedEOF 879 } 880 iNdEx += skippy 881 } 882 } 883 884 if iNdEx > l { 885 return io.ErrUnexpectedEOF 886 } 887 return nil 888 } 889 func (m *ResponseHeader) Unmarshal(dAtA []byte) error { 890 l := len(dAtA) 891 iNdEx := 0 892 for iNdEx < l { 893 preIndex := iNdEx 894 var wire uint64 895 for shift := uint(0); ; shift += 7 { 896 if shift >= 64 { 897 return ErrIntOverflowResponse 898 } 899 if iNdEx >= l { 900 return io.ErrUnexpectedEOF 901 } 902 b := dAtA[iNdEx] 903 iNdEx++ 904 wire |= uint64(b&0x7F) << shift 905 if b < 0x80 { 906 break 907 } 908 } 909 fieldNum := int32(wire >> 3) 910 wireType := int(wire & 0x7) 911 if wireType == 4 { 912 return fmt.Errorf("proto: ResponseHeader: wiretype end group for non-group") 913 } 914 if fieldNum <= 0 { 915 return fmt.Errorf("proto: ResponseHeader: illegal tag %d (wire type %d)", fieldNum, wire) 916 } 917 switch fieldNum { 918 case 1: 919 if wireType != 2 { 920 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 921 } 922 var stringLen uint64 923 for shift := uint(0); ; shift += 7 { 924 if shift >= 64 { 925 return ErrIntOverflowResponse 926 } 927 if iNdEx >= l { 928 return io.ErrUnexpectedEOF 929 } 930 b := dAtA[iNdEx] 931 iNdEx++ 932 stringLen |= uint64(b&0x7F) << shift 933 if b < 0x80 { 934 break 935 } 936 } 937 intStringLen := int(stringLen) 938 if intStringLen < 0 { 939 return ErrInvalidLengthResponse 940 } 941 postIndex := iNdEx + intStringLen 942 if postIndex < 0 { 943 return ErrInvalidLengthResponse 944 } 945 if postIndex > l { 946 return io.ErrUnexpectedEOF 947 } 948 m.Name = string(dAtA[iNdEx:postIndex]) 949 iNdEx = postIndex 950 case 2: 951 if wireType != 2 { 952 return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) 953 } 954 var stringLen uint64 955 for shift := uint(0); ; shift += 7 { 956 if shift >= 64 { 957 return ErrIntOverflowResponse 958 } 959 if iNdEx >= l { 960 return io.ErrUnexpectedEOF 961 } 962 b := dAtA[iNdEx] 963 iNdEx++ 964 stringLen |= uint64(b&0x7F) << shift 965 if b < 0x80 { 966 break 967 } 968 } 969 intStringLen := int(stringLen) 970 if intStringLen < 0 { 971 return ErrInvalidLengthResponse 972 } 973 postIndex := iNdEx + intStringLen 974 if postIndex < 0 { 975 return ErrInvalidLengthResponse 976 } 977 if postIndex > l { 978 return io.ErrUnexpectedEOF 979 } 980 m.Values = append(m.Values, string(dAtA[iNdEx:postIndex])) 981 iNdEx = postIndex 982 default: 983 iNdEx = preIndex 984 skippy, err := skipResponse(dAtA[iNdEx:]) 985 if err != nil { 986 return err 987 } 988 if (skippy < 0) || (iNdEx+skippy) < 0 { 989 return ErrInvalidLengthResponse 990 } 991 if (iNdEx + skippy) > l { 992 return io.ErrUnexpectedEOF 993 } 994 iNdEx += skippy 995 } 996 } 997 998 if iNdEx > l { 999 return io.ErrUnexpectedEOF 1000 } 1001 return nil 1002 } 1003 func skipResponse(dAtA []byte) (n int, err error) { 1004 l := len(dAtA) 1005 iNdEx := 0 1006 depth := 0 1007 for iNdEx < l { 1008 var wire uint64 1009 for shift := uint(0); ; shift += 7 { 1010 if shift >= 64 { 1011 return 0, ErrIntOverflowResponse 1012 } 1013 if iNdEx >= l { 1014 return 0, io.ErrUnexpectedEOF 1015 } 1016 b := dAtA[iNdEx] 1017 iNdEx++ 1018 wire |= (uint64(b) & 0x7F) << shift 1019 if b < 0x80 { 1020 break 1021 } 1022 } 1023 wireType := int(wire & 0x7) 1024 switch wireType { 1025 case 0: 1026 for shift := uint(0); ; shift += 7 { 1027 if shift >= 64 { 1028 return 0, ErrIntOverflowResponse 1029 } 1030 if iNdEx >= l { 1031 return 0, io.ErrUnexpectedEOF 1032 } 1033 iNdEx++ 1034 if dAtA[iNdEx-1] < 0x80 { 1035 break 1036 } 1037 } 1038 case 1: 1039 iNdEx += 8 1040 case 2: 1041 var length int 1042 for shift := uint(0); ; shift += 7 { 1043 if shift >= 64 { 1044 return 0, ErrIntOverflowResponse 1045 } 1046 if iNdEx >= l { 1047 return 0, io.ErrUnexpectedEOF 1048 } 1049 b := dAtA[iNdEx] 1050 iNdEx++ 1051 length |= (int(b) & 0x7F) << shift 1052 if b < 0x80 { 1053 break 1054 } 1055 } 1056 if length < 0 { 1057 return 0, ErrInvalidLengthResponse 1058 } 1059 iNdEx += length 1060 case 3: 1061 depth++ 1062 case 4: 1063 if depth == 0 { 1064 return 0, ErrUnexpectedEndOfGroupResponse 1065 } 1066 depth-- 1067 case 5: 1068 iNdEx += 4 1069 default: 1070 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1071 } 1072 if iNdEx < 0 { 1073 return 0, ErrInvalidLengthResponse 1074 } 1075 if depth == 0 { 1076 return iNdEx, nil 1077 } 1078 } 1079 return 0, io.ErrUnexpectedEOF 1080 } 1081 1082 var ( 1083 ErrInvalidLengthResponse = fmt.Errorf("proto: negative length found during unmarshaling") 1084 ErrIntOverflowResponse = fmt.Errorf("proto: integer overflow") 1085 ErrUnexpectedEndOfGroupResponse = fmt.Errorf("proto: unexpected end of group") 1086 )