message.pb.go 14.2 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: message.proto

package namesys_pb

import (
	fmt "fmt"
	proto "github.com/gogo/protobuf/proto"
	io "io"
	math "math"
11
	math_bits "math/bits"
12 13 14 15 16 17 18 19 20 21 22
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
23
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
24

25
type FetchResponse_StatusCode int32
26 27

const (
28 29
	FetchResponse_OK        FetchResponse_StatusCode = 0
	FetchResponse_NOT_FOUND FetchResponse_StatusCode = 1
30
	FetchResponse_ERROR     FetchResponse_StatusCode = 2
31 32
)

33 34
var FetchResponse_StatusCode_name = map[int32]string{
	0: "OK",
35
	1: "NOT_FOUND",
36
	2: "ERROR",
37 38
}

39 40
var FetchResponse_StatusCode_value = map[string]int32{
	"OK":        0,
41
	"NOT_FOUND": 1,
42
	"ERROR":     2,
43 44
}

45 46
func (x FetchResponse_StatusCode) String() string {
	return proto.EnumName(FetchResponse_StatusCode_name, int32(x))
47 48
}

49
func (FetchResponse_StatusCode) EnumDescriptor() ([]byte, []int) {
50 51 52
	return fileDescriptor_33c57e4bae7b9afd, []int{1, 0}
}

53
type FetchRequest struct {
54
	Identifier           string   `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
55 56 57 58 59
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

60 61 62 63
func (m *FetchRequest) Reset()         { *m = FetchRequest{} }
func (m *FetchRequest) String() string { return proto.CompactTextString(m) }
func (*FetchRequest) ProtoMessage()    {}
func (*FetchRequest) Descriptor() ([]byte, []int) {
Adin Schmahmann's avatar
Adin Schmahmann committed
64
	return fileDescriptor_33c57e4bae7b9afd, []int{0}
65
}
66
func (m *FetchRequest) XXX_Unmarshal(b []byte) error {
67 68
	return m.Unmarshal(b)
}
69
func (m *FetchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
70
	if deterministic {
71
		return xxx_messageInfo_FetchRequest.Marshal(b, m, deterministic)
72 73
	} else {
		b = b[:cap(b)]
74
		n, err := m.MarshalToSizedBuffer(b)
75 76 77 78 79 80
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
81 82
func (m *FetchRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_FetchRequest.Merge(m, src)
83
}
84
func (m *FetchRequest) XXX_Size() int {
85 86
	return m.Size()
}
87 88
func (m *FetchRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_FetchRequest.DiscardUnknown(m)
89 90
}

91
var xxx_messageInfo_FetchRequest proto.InternalMessageInfo
92

93
func (m *FetchRequest) GetIdentifier() string {
94 95
	if m != nil {
		return m.Identifier
96 97 98 99
	}
	return ""
}

100 101
type FetchResponse struct {
	Status               FetchResponse_StatusCode `protobuf:"varint,1,opt,name=status,proto3,enum=namesys.pb.FetchResponse_StatusCode" json:"status,omitempty"`
102
	Data                 []byte                   `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
103 104 105
	XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
	XXX_unrecognized     []byte                   `json:"-"`
	XXX_sizecache        int32                    `json:"-"`
106 107
}

108 109 110 111
func (m *FetchResponse) Reset()         { *m = FetchResponse{} }
func (m *FetchResponse) String() string { return proto.CompactTextString(m) }
func (*FetchResponse) ProtoMessage()    {}
func (*FetchResponse) Descriptor() ([]byte, []int) {
112 113
	return fileDescriptor_33c57e4bae7b9afd, []int{1}
}
114
func (m *FetchResponse) XXX_Unmarshal(b []byte) error {
115 116
	return m.Unmarshal(b)
}
117
func (m *FetchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
118
	if deterministic {
119
		return xxx_messageInfo_FetchResponse.Marshal(b, m, deterministic)
120 121
	} else {
		b = b[:cap(b)]
122
		n, err := m.MarshalToSizedBuffer(b)
123 124 125 126 127 128
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
129 130
func (m *FetchResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_FetchResponse.Merge(m, src)
131
}
132
func (m *FetchResponse) XXX_Size() int {
133 134
	return m.Size()
}
135 136
func (m *FetchResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_FetchResponse.DiscardUnknown(m)
137 138
}

139
var xxx_messageInfo_FetchResponse proto.InternalMessageInfo
140

141
func (m *FetchResponse) GetStatus() FetchResponse_StatusCode {
142
	if m != nil {
143
		return m.Status
144
	}
145
	return FetchResponse_OK
146 147
}

148
func (m *FetchResponse) GetData() []byte {
149
	if m != nil {
150
		return m.Data
151
	}
152
	return nil
153 154
}

155
func init() {
156 157 158
	proto.RegisterEnum("namesys.pb.FetchResponse_StatusCode", FetchResponse_StatusCode_name, FetchResponse_StatusCode_value)
	proto.RegisterType((*FetchRequest)(nil), "namesys.pb.FetchRequest")
	proto.RegisterType((*FetchResponse)(nil), "namesys.pb.FetchResponse")
159 160 161 162 163
}

func init() { proto.RegisterFile("message.proto", fileDescriptor_33c57e4bae7b9afd) }

var fileDescriptor_33c57e4bae7b9afd = []byte{
164
	// 212 bytes of a gzipped FileDescriptorProto
165 166
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcd, 0x4d, 0x2d, 0x2e,
	0x4e, 0x4c, 0x4f, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xca, 0x4b, 0xcc, 0x4d, 0x2d,
167 168
	0xae, 0x2c, 0xd6, 0x2b, 0x48, 0x52, 0xd2, 0xe3, 0xe2, 0x71, 0x4b, 0x2d, 0x49, 0xce, 0x08, 0x4a,
	0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x11, 0x92, 0xe3, 0xe2, 0xca, 0x4c, 0x49, 0xcd, 0x2b, 0xc9, 0x4c,
169 170 171 172 173 174 175 176 177 178
	0xcb, 0x4c, 0x2d, 0x92, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x42, 0x12, 0x51, 0x9a, 0xc8, 0xc8,
	0xc5, 0x0b, 0xd5, 0x50, 0x5c, 0x90, 0x9f, 0x57, 0x9c, 0x2a, 0x64, 0xc3, 0xc5, 0x56, 0x5c, 0x92,
	0x58, 0x52, 0x5a, 0x0c, 0x56, 0xcd, 0x67, 0xa4, 0xa2, 0x87, 0x30, 0x5e, 0x0f, 0x45, 0xa9, 0x5e,
	0x30, 0x58, 0x9d, 0x73, 0x7e, 0x4a, 0x6a, 0x10, 0x54, 0x8f, 0x90, 0x10, 0x17, 0x4b, 0x4a, 0x62,
	0x49, 0xa2, 0x04, 0x93, 0x02, 0xa3, 0x06, 0x4f, 0x10, 0x98, 0xad, 0xa4, 0xc7, 0xc5, 0x85, 0x50,
	0x29, 0xc4, 0xc6, 0xc5, 0xe4, 0xef, 0x2d, 0xc0, 0x20, 0xc4, 0xcb, 0xc5, 0xe9, 0xe7, 0x1f, 0x12,
	0xef, 0xe6, 0x1f, 0xea, 0xe7, 0x22, 0xc0, 0x28, 0xc4, 0xc9, 0xc5, 0xea, 0x1a, 0x14, 0xe4, 0x1f,
	0x24, 0xc0, 0xe4, 0xc4, 0x73, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9,
	0x31, 0x26, 0xb1, 0x81, 0x3d, 0x69, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xc8, 0x6e, 0x00, 0xfe,
	0xf5, 0x00, 0x00, 0x00,
179 180
}

181
func (m *FetchRequest) Marshal() (dAtA []byte, err error) {
182 183
	size := m.Size()
	dAtA = make([]byte, size)
184
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
185 186 187 188 189 190
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

191
func (m *FetchRequest) MarshalTo(dAtA []byte) (int, error) {
192 193 194 195 196 197
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *FetchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
198 199 200
	_ = i
	var l int
	_ = l
201 202 203 204
	if m.XXX_unrecognized != nil {
		i -= len(m.XXX_unrecognized)
		copy(dAtA[i:], m.XXX_unrecognized)
	}
205
	if len(m.Identifier) > 0 {
206 207
		i -= len(m.Identifier)
		copy(dAtA[i:], m.Identifier)
208
		i = encodeVarintMessage(dAtA, i, uint64(len(m.Identifier)))
209 210
		i--
		dAtA[i] = 0xa
211
	}
212
	return len(dAtA) - i, nil
213 214
}

215
func (m *FetchResponse) Marshal() (dAtA []byte, err error) {
216 217
	size := m.Size()
	dAtA = make([]byte, size)
218
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
219 220 221 222 223 224
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

225
func (m *FetchResponse) MarshalTo(dAtA []byte) (int, error) {
226 227 228 229 230 231
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *FetchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
232 233 234
	_ = i
	var l int
	_ = l
235 236 237
	if m.XXX_unrecognized != nil {
		i -= len(m.XXX_unrecognized)
		copy(dAtA[i:], m.XXX_unrecognized)
238
	}
239
	if len(m.Data) > 0 {
240 241
		i -= len(m.Data)
		copy(dAtA[i:], m.Data)
242
		i = encodeVarintMessage(dAtA, i, uint64(len(m.Data)))
243 244
		i--
		dAtA[i] = 0x12
245
	}
246 247 248 249
	if m.Status != 0 {
		i = encodeVarintMessage(dAtA, i, uint64(m.Status))
		i--
		dAtA[i] = 0x8
250
	}
251
	return len(dAtA) - i, nil
252 253
}

254
func encodeVarintMessage(dAtA []byte, offset int, v uint64) int {
255 256
	offset -= sovMessage(v)
	base := offset
257 258 259 260 261 262
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
263
	return base
264
}
265
func (m *FetchRequest) Size() (n int) {
266 267 268 269 270
	if m == nil {
		return 0
	}
	var l int
	_ = l
271 272
	l = len(m.Identifier)
	if l > 0 {
273 274 275 276 277 278 279 280
		n += 1 + l + sovMessage(uint64(l))
	}
	if m.XXX_unrecognized != nil {
		n += len(m.XXX_unrecognized)
	}
	return n
}

281
func (m *FetchResponse) Size() (n int) {
282 283 284 285 286
	if m == nil {
		return 0
	}
	var l int
	_ = l
287 288 289
	if m.Status != 0 {
		n += 1 + sovMessage(uint64(m.Status))
	}
290 291
	l = len(m.Data)
	if l > 0 {
292 293 294 295 296 297 298 299
		n += 1 + l + sovMessage(uint64(l))
	}
	if m.XXX_unrecognized != nil {
		n += len(m.XXX_unrecognized)
	}
	return n
}

300
func sovMessage(x uint64) (n int) {
301
	return (math_bits.Len64(x|1) + 6) / 7
302 303 304 305
}
func sozMessage(x uint64) (n int) {
	return sovMessage(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
306
func (m *FetchRequest) Unmarshal(dAtA []byte) error {
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowMessage
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
329
			return fmt.Errorf("proto: FetchRequest: wiretype end group for non-group")
330 331
		}
		if fieldNum <= 0 {
332
			return fmt.Errorf("proto: FetchRequest: illegal tag %d (wire type %d)", fieldNum, wire)
333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Identifier", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowMessage
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthMessage
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthMessage
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
365
			m.Identifier = string(dAtA[iNdEx:postIndex])
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipMessage(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthMessage
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthMessage
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
392
func (m *FetchResponse) Unmarshal(dAtA []byte) error {
393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowMessage
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
415
			return fmt.Errorf("proto: FetchResponse: wiretype end group for non-group")
416 417
		}
		if fieldNum <= 0 {
418
			return fmt.Errorf("proto: FetchResponse: illegal tag %d (wire type %d)", fieldNum, wire)
419 420 421
		}
		switch fieldNum {
		case 1:
422 423 424 425 426 427 428 429 430 431 432 433 434
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
			}
			m.Status = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowMessage
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
435
				m.Status |= FetchResponse_StatusCode(b&0x7F) << shift
436 437 438 439 440
				if b < 0x80 {
					break
				}
			}
		case 2:
441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowMessage
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthMessage
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthMessage
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
			if m.Data == nil {
				m.Data = []byte{}
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipMessage(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthMessage
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthMessage
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
499 500 501
func skipMessage(dAtA []byte) (n int, err error) {
	l := len(dAtA)
	iNdEx := 0
502
	depth := 0
503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559
	for iNdEx < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return 0, ErrIntOverflowMessage
			}
			if iNdEx >= l {
				return 0, io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		wireType := int(wire & 0x7)
		switch wireType {
		case 0:
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowMessage
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				iNdEx++
				if dAtA[iNdEx-1] < 0x80 {
					break
				}
			}
		case 1:
			iNdEx += 8
		case 2:
			var length int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowMessage
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				length |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if length < 0 {
				return 0, ErrInvalidLengthMessage
			}
			iNdEx += length
			if iNdEx < 0 {
				return 0, ErrInvalidLengthMessage
			}
		case 3:
560
			depth++
561
		case 4:
562 563 564 565
			if depth == 0 {
				return 0, ErrUnexpectedEndOfGroupMessage
			}
			depth--
566 567 568 569 570
		case 5:
			iNdEx += 4
		default:
			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
		}
571 572 573
		if depth == 0 {
			return iNdEx, nil
		}
574
	}
575
	return 0, io.ErrUnexpectedEOF
576 577 578
}

var (
579 580 581
	ErrInvalidLengthMessage        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMessage          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMessage = fmt.Errorf("proto: unexpected end of group")
582
)