// 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" math_bits "math/bits" ) // 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. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type FetchResponse_StatusCode int32 const ( FetchResponse_OK FetchResponse_StatusCode = 0 FetchResponse_NOT_FOUND FetchResponse_StatusCode = 1 FetchResponse_ERROR FetchResponse_StatusCode = 2 ) var FetchResponse_StatusCode_name = map[int32]string{ 0: "OK", 1: "NOT_FOUND", 2: "ERROR", } var FetchResponse_StatusCode_value = map[string]int32{ "OK": 0, "NOT_FOUND": 1, "ERROR": 2, } func (x FetchResponse_StatusCode) String() string { return proto.EnumName(FetchResponse_StatusCode_name, int32(x)) } func (FetchResponse_StatusCode) EnumDescriptor() ([]byte, []int) { return fileDescriptor_33c57e4bae7b9afd, []int{1, 0} } type FetchRequest struct { Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *FetchRequest) Reset() { *m = FetchRequest{} } func (m *FetchRequest) String() string { return proto.CompactTextString(m) } func (*FetchRequest) ProtoMessage() {} func (*FetchRequest) Descriptor() ([]byte, []int) { return fileDescriptor_33c57e4bae7b9afd, []int{0} } func (m *FetchRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *FetchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_FetchRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *FetchRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_FetchRequest.Merge(m, src) } func (m *FetchRequest) XXX_Size() int { return m.Size() } func (m *FetchRequest) XXX_DiscardUnknown() { xxx_messageInfo_FetchRequest.DiscardUnknown(m) } var xxx_messageInfo_FetchRequest proto.InternalMessageInfo func (m *FetchRequest) GetIdentifier() string { if m != nil { return m.Identifier } return "" } type FetchResponse struct { Status FetchResponse_StatusCode `protobuf:"varint,1,opt,name=status,proto3,enum=namesys.pb.FetchResponse_StatusCode" json:"status,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *FetchResponse) Reset() { *m = FetchResponse{} } func (m *FetchResponse) String() string { return proto.CompactTextString(m) } func (*FetchResponse) ProtoMessage() {} func (*FetchResponse) Descriptor() ([]byte, []int) { return fileDescriptor_33c57e4bae7b9afd, []int{1} } func (m *FetchResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *FetchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_FetchResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *FetchResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_FetchResponse.Merge(m, src) } func (m *FetchResponse) XXX_Size() int { return m.Size() } func (m *FetchResponse) XXX_DiscardUnknown() { xxx_messageInfo_FetchResponse.DiscardUnknown(m) } var xxx_messageInfo_FetchResponse proto.InternalMessageInfo func (m *FetchResponse) GetStatus() FetchResponse_StatusCode { if m != nil { return m.Status } return FetchResponse_OK } func (m *FetchResponse) GetData() []byte { if m != nil { return m.Data } return nil } func init() { 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") } func init() { proto.RegisterFile("message.proto", fileDescriptor_33c57e4bae7b9afd) } var fileDescriptor_33c57e4bae7b9afd = []byte{ // 212 bytes of a gzipped FileDescriptorProto 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, 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, 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, } func (m *FetchRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *FetchRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *FetchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.XXX_unrecognized != nil { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Identifier) > 0 { i -= len(m.Identifier) copy(dAtA[i:], m.Identifier) i = encodeVarintMessage(dAtA, i, uint64(len(m.Identifier))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *FetchResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *FetchResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *FetchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.XXX_unrecognized != nil { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Data) > 0 { i -= len(m.Data) copy(dAtA[i:], m.Data) i = encodeVarintMessage(dAtA, i, uint64(len(m.Data))) i-- dAtA[i] = 0x12 } if m.Status != 0 { i = encodeVarintMessage(dAtA, i, uint64(m.Status)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func encodeVarintMessage(dAtA []byte, offset int, v uint64) int { offset -= sovMessage(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *FetchRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Identifier) if l > 0 { n += 1 + l + sovMessage(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *FetchResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Status != 0 { n += 1 + sovMessage(uint64(m.Status)) } l = len(m.Data) if l > 0 { n += 1 + l + sovMessage(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func sovMessage(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozMessage(x uint64) (n int) { return sovMessage(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *FetchRequest) Unmarshal(dAtA []byte) error { 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 { return fmt.Errorf("proto: FetchRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: FetchRequest: illegal tag %d (wire type %d)", fieldNum, wire) } 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 } m.Identifier = string(dAtA[iNdEx:postIndex]) 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 } func (m *FetchResponse) Unmarshal(dAtA []byte) error { 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 { return fmt.Errorf("proto: FetchResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: FetchResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: 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++ m.Status |= FetchResponse_StatusCode(b&0x7F) << shift if b < 0x80 { break } } case 2: 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 } func skipMessage(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 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: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupMessage } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthMessage = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMessage = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupMessage = fmt.Errorf("proto: unexpected end of group") )