// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: message.proto package graphsync_message_pb import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" import _ "github.com/gogo/protobuf/gogoproto" import io "io" // 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package type Message struct { // the actual data included in this message CompleteRequestList bool `protobuf:"varint,1,opt,name=completeRequestList,proto3" json:"completeRequestList,omitempty"` Requests []Message_Request `protobuf:"bytes,2,rep,name=requests" json:"requests"` Responses []Message_Response `protobuf:"bytes,3,rep,name=responses" json:"responses"` Data []Message_Block `protobuf:"bytes,4,rep,name=data" json:"data"` } func (m *Message) Reset() { *m = Message{} } func (m *Message) String() string { return proto.CompactTextString(m) } func (*Message) ProtoMessage() {} func (*Message) Descriptor() ([]byte, []int) { return fileDescriptor_message_c5788c4e9f6c17be, []int{0} } func (m *Message) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Message.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } func (dst *Message) XXX_Merge(src proto.Message) { xxx_messageInfo_Message.Merge(dst, src) } func (m *Message) XXX_Size() int { return m.Size() } func (m *Message) XXX_DiscardUnknown() { xxx_messageInfo_Message.DiscardUnknown(m) } var xxx_messageInfo_Message proto.InternalMessageInfo func (m *Message) GetCompleteRequestList() bool { if m != nil { return m.CompleteRequestList } return false } func (m *Message) GetRequests() []Message_Request { if m != nil { return m.Requests } return nil } func (m *Message) GetResponses() []Message_Response { if m != nil { return m.Responses } return nil } func (m *Message) GetData() []Message_Block { if m != nil { return m.Data } return nil } type Message_Request struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Root []byte `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty"` Selector []byte `protobuf:"bytes,3,opt,name=selector,proto3" json:"selector,omitempty"` Extensions map[string][]byte `protobuf:"bytes,4,rep,name=extensions" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` Priority int32 `protobuf:"varint,5,opt,name=priority,proto3" json:"priority,omitempty"` Cancel bool `protobuf:"varint,6,opt,name=cancel,proto3" json:"cancel,omitempty"` } func (m *Message_Request) Reset() { *m = Message_Request{} } func (m *Message_Request) String() string { return proto.CompactTextString(m) } func (*Message_Request) ProtoMessage() {} func (*Message_Request) Descriptor() ([]byte, []int) { return fileDescriptor_message_c5788c4e9f6c17be, []int{0, 0} } func (m *Message_Request) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Message_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Message_Request.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } func (dst *Message_Request) XXX_Merge(src proto.Message) { xxx_messageInfo_Message_Request.Merge(dst, src) } func (m *Message_Request) XXX_Size() int { return m.Size() } func (m *Message_Request) XXX_DiscardUnknown() { xxx_messageInfo_Message_Request.DiscardUnknown(m) } var xxx_messageInfo_Message_Request proto.InternalMessageInfo func (m *Message_Request) GetId() int32 { if m != nil { return m.Id } return 0 } func (m *Message_Request) GetRoot() []byte { if m != nil { return m.Root } return nil } func (m *Message_Request) GetSelector() []byte { if m != nil { return m.Selector } return nil } func (m *Message_Request) GetExtensions() map[string][]byte { if m != nil { return m.Extensions } return nil } func (m *Message_Request) GetPriority() int32 { if m != nil { return m.Priority } return 0 } func (m *Message_Request) GetCancel() bool { if m != nil { return m.Cancel } return false } type Message_Response struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"` Extensions map[string][]byte `protobuf:"bytes,3,rep,name=extensions" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *Message_Response) Reset() { *m = Message_Response{} } func (m *Message_Response) String() string { return proto.CompactTextString(m) } func (*Message_Response) ProtoMessage() {} func (*Message_Response) Descriptor() ([]byte, []int) { return fileDescriptor_message_c5788c4e9f6c17be, []int{0, 1} } func (m *Message_Response) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Message_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Message_Response.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } func (dst *Message_Response) XXX_Merge(src proto.Message) { xxx_messageInfo_Message_Response.Merge(dst, src) } func (m *Message_Response) XXX_Size() int { return m.Size() } func (m *Message_Response) XXX_DiscardUnknown() { xxx_messageInfo_Message_Response.DiscardUnknown(m) } var xxx_messageInfo_Message_Response proto.InternalMessageInfo func (m *Message_Response) GetId() int32 { if m != nil { return m.Id } return 0 } func (m *Message_Response) GetStatus() int32 { if m != nil { return m.Status } return 0 } func (m *Message_Response) GetExtensions() map[string][]byte { if m != nil { return m.Extensions } return nil } type Message_Block struct { Prefix []byte `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` } func (m *Message_Block) Reset() { *m = Message_Block{} } func (m *Message_Block) String() string { return proto.CompactTextString(m) } func (*Message_Block) ProtoMessage() {} func (*Message_Block) Descriptor() ([]byte, []int) { return fileDescriptor_message_c5788c4e9f6c17be, []int{0, 2} } func (m *Message_Block) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Message_Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Message_Block.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) if err != nil { return nil, err } return b[:n], nil } } func (dst *Message_Block) XXX_Merge(src proto.Message) { xxx_messageInfo_Message_Block.Merge(dst, src) } func (m *Message_Block) XXX_Size() int { return m.Size() } func (m *Message_Block) XXX_DiscardUnknown() { xxx_messageInfo_Message_Block.DiscardUnknown(m) } var xxx_messageInfo_Message_Block proto.InternalMessageInfo func (m *Message_Block) GetPrefix() []byte { if m != nil { return m.Prefix } return nil } func (m *Message_Block) GetData() []byte { if m != nil { return m.Data } return nil } func init() { proto.RegisterType((*Message)(nil), "graphsync.message.pb.Message") proto.RegisterType((*Message_Request)(nil), "graphsync.message.pb.Message.Request") proto.RegisterMapType((map[string][]byte)(nil), "graphsync.message.pb.Message.Request.ExtensionsEntry") proto.RegisterType((*Message_Response)(nil), "graphsync.message.pb.Message.Response") proto.RegisterMapType((map[string][]byte)(nil), "graphsync.message.pb.Message.Response.ExtensionsEntry") proto.RegisterType((*Message_Block)(nil), "graphsync.message.pb.Message.Block") } func (m *Message) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Message) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.CompleteRequestList { dAtA[i] = 0x8 i++ if m.CompleteRequestList { dAtA[i] = 1 } else { dAtA[i] = 0 } i++ } if len(m.Requests) > 0 { for _, msg := range m.Requests { dAtA[i] = 0x12 i++ i = encodeVarintMessage(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } if len(m.Responses) > 0 { for _, msg := range m.Responses { dAtA[i] = 0x1a i++ i = encodeVarintMessage(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } if len(m.Data) > 0 { for _, msg := range m.Data { dAtA[i] = 0x22 i++ i = encodeVarintMessage(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } return i, nil } func (m *Message_Request) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Message_Request) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Id != 0 { dAtA[i] = 0x8 i++ i = encodeVarintMessage(dAtA, i, uint64(m.Id)) } if len(m.Root) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintMessage(dAtA, i, uint64(len(m.Root))) i += copy(dAtA[i:], m.Root) } if len(m.Selector) > 0 { dAtA[i] = 0x1a i++ i = encodeVarintMessage(dAtA, i, uint64(len(m.Selector))) i += copy(dAtA[i:], m.Selector) } if len(m.Extensions) > 0 { for k, _ := range m.Extensions { dAtA[i] = 0x22 i++ v := m.Extensions[k] byteSize := 0 if len(v) > 0 { byteSize = 1 + len(v) + sovMessage(uint64(len(v))) } mapSize := 1 + len(k) + sovMessage(uint64(len(k))) + byteSize i = encodeVarintMessage(dAtA, i, uint64(mapSize)) dAtA[i] = 0xa i++ i = encodeVarintMessage(dAtA, i, uint64(len(k))) i += copy(dAtA[i:], k) if len(v) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintMessage(dAtA, i, uint64(len(v))) i += copy(dAtA[i:], v) } } } if m.Priority != 0 { dAtA[i] = 0x28 i++ i = encodeVarintMessage(dAtA, i, uint64(m.Priority)) } if m.Cancel { dAtA[i] = 0x30 i++ if m.Cancel { dAtA[i] = 1 } else { dAtA[i] = 0 } i++ } return i, nil } func (m *Message_Response) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Message_Response) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Id != 0 { dAtA[i] = 0x8 i++ i = encodeVarintMessage(dAtA, i, uint64(m.Id)) } if m.Status != 0 { dAtA[i] = 0x10 i++ i = encodeVarintMessage(dAtA, i, uint64(m.Status)) } if len(m.Extensions) > 0 { for k, _ := range m.Extensions { dAtA[i] = 0x1a i++ v := m.Extensions[k] byteSize := 0 if len(v) > 0 { byteSize = 1 + len(v) + sovMessage(uint64(len(v))) } mapSize := 1 + len(k) + sovMessage(uint64(len(k))) + byteSize i = encodeVarintMessage(dAtA, i, uint64(mapSize)) dAtA[i] = 0xa i++ i = encodeVarintMessage(dAtA, i, uint64(len(k))) i += copy(dAtA[i:], k) if len(v) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintMessage(dAtA, i, uint64(len(v))) i += copy(dAtA[i:], v) } } } return i, nil } func (m *Message_Block) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Message_Block) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Prefix) > 0 { dAtA[i] = 0xa i++ i = encodeVarintMessage(dAtA, i, uint64(len(m.Prefix))) i += copy(dAtA[i:], m.Prefix) } if len(m.Data) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintMessage(dAtA, i, uint64(len(m.Data))) i += copy(dAtA[i:], m.Data) } return i, nil } func encodeVarintMessage(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return offset + 1 } func (m *Message) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.CompleteRequestList { n += 2 } if len(m.Requests) > 0 { for _, e := range m.Requests { l = e.Size() n += 1 + l + sovMessage(uint64(l)) } } if len(m.Responses) > 0 { for _, e := range m.Responses { l = e.Size() n += 1 + l + sovMessage(uint64(l)) } } if len(m.Data) > 0 { for _, e := range m.Data { l = e.Size() n += 1 + l + sovMessage(uint64(l)) } } return n } func (m *Message_Request) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Id != 0 { n += 1 + sovMessage(uint64(m.Id)) } l = len(m.Root) if l > 0 { n += 1 + l + sovMessage(uint64(l)) } l = len(m.Selector) if l > 0 { n += 1 + l + sovMessage(uint64(l)) } if len(m.Extensions) > 0 { for k, v := range m.Extensions { _ = k _ = v l = 0 if len(v) > 0 { l = 1 + len(v) + sovMessage(uint64(len(v))) } mapEntrySize := 1 + len(k) + sovMessage(uint64(len(k))) + l n += mapEntrySize + 1 + sovMessage(uint64(mapEntrySize)) } } if m.Priority != 0 { n += 1 + sovMessage(uint64(m.Priority)) } if m.Cancel { n += 2 } return n } func (m *Message_Response) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Id != 0 { n += 1 + sovMessage(uint64(m.Id)) } if m.Status != 0 { n += 1 + sovMessage(uint64(m.Status)) } if len(m.Extensions) > 0 { for k, v := range m.Extensions { _ = k _ = v l = 0 if len(v) > 0 { l = 1 + len(v) + sovMessage(uint64(len(v))) } mapEntrySize := 1 + len(k) + sovMessage(uint64(len(k))) + l n += mapEntrySize + 1 + sovMessage(uint64(mapEntrySize)) } } return n } func (m *Message_Block) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Prefix) if l > 0 { n += 1 + l + sovMessage(uint64(l)) } l = len(m.Data) if l > 0 { n += 1 + l + sovMessage(uint64(l)) } return n } func sovMessage(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozMessage(x uint64) (n int) { return sovMessage(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *Message) 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: Message: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field CompleteRequestList", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessage } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } m.CompleteRequestList = bool(v != 0) case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessage } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthMessage } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.Requests = append(m.Requests, Message_Request{}) if err := m.Requests[len(m.Requests)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Responses", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessage } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthMessage } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.Responses = append(m.Responses, Message_Response{}) if err := m.Responses[len(m.Responses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessage } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthMessage } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.Data = append(m.Data, Message_Block{}) if err := m.Data[len(m.Data)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipMessage(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthMessage } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Message_Request) 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: Request: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessage } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Id |= (int32(b) & 0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Root", 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 > l { return io.ErrUnexpectedEOF } m.Root = append(m.Root[:0], dAtA[iNdEx:postIndex]...) if m.Root == nil { m.Root = []byte{} } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Selector", 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 > l { return io.ErrUnexpectedEOF } m.Selector = append(m.Selector[:0], dAtA[iNdEx:postIndex]...) if m.Selector == nil { m.Selector = []byte{} } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Extensions", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessage } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthMessage } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Extensions == nil { m.Extensions = make(map[string][]byte) } var mapkey string mapvalue := []byte{} for iNdEx < postIndex { entryPreIndex := 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) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessage } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return ErrInvalidLengthMessage } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapbyteLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessage } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapbyteLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intMapbyteLen := int(mapbyteLen) if intMapbyteLen < 0 { return ErrInvalidLengthMessage } postbytesIndex := iNdEx + intMapbyteLen if postbytesIndex > l { return io.ErrUnexpectedEOF } mapvalue = make([]byte, mapbyteLen) copy(mapvalue, dAtA[iNdEx:postbytesIndex]) iNdEx = postbytesIndex } else { iNdEx = entryPreIndex skippy, err := skipMessage(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthMessage } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Extensions[mapkey] = mapvalue iNdEx = postIndex case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType) } m.Priority = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessage } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Priority |= (int32(b) & 0x7F) << shift if b < 0x80 { break } } case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Cancel", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessage } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } m.Cancel = bool(v != 0) default: iNdEx = preIndex skippy, err := skipMessage(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthMessage } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Message_Response) 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: Response: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessage } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Id |= (int32(b) & 0x7F) << shift if b < 0x80 { break } } case 2: 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 |= (int32(b) & 0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Extensions", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessage } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthMessage } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Extensions == nil { m.Extensions = make(map[string][]byte) } var mapkey string mapvalue := []byte{} for iNdEx < postIndex { entryPreIndex := 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) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessage } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return ErrInvalidLengthMessage } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapbyteLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMessage } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapbyteLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intMapbyteLen := int(mapbyteLen) if intMapbyteLen < 0 { return ErrInvalidLengthMessage } postbytesIndex := iNdEx + intMapbyteLen if postbytesIndex > l { return io.ErrUnexpectedEOF } mapvalue = make([]byte, mapbyteLen) copy(mapvalue, dAtA[iNdEx:postbytesIndex]) iNdEx = postbytesIndex } else { iNdEx = entryPreIndex skippy, err := skipMessage(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthMessage } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Extensions[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipMessage(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthMessage } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Message_Block) 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: Block: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Block: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Prefix", 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 > l { return io.ErrUnexpectedEOF } m.Prefix = append(m.Prefix[:0], dAtA[iNdEx:postIndex]...) if m.Prefix == nil { m.Prefix = []byte{} } iNdEx = postIndex 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 > 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) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipMessage(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 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 } } return iNdEx, nil case 1: iNdEx += 8 return iNdEx, nil 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 } } iNdEx += length if length < 0 { return 0, ErrInvalidLengthMessage } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowMessage } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ innerWire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } innerWireType := int(innerWire & 0x7) if innerWireType == 4 { break } next, err := skipMessage(dAtA[start:]) if err != nil { return 0, err } iNdEx = start + next } return iNdEx, nil case 4: return iNdEx, nil case 5: iNdEx += 4 return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } } panic("unreachable") } var ( ErrInvalidLengthMessage = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMessage = fmt.Errorf("proto: integer overflow") ) func init() { proto.RegisterFile("message.proto", fileDescriptor_message_c5788c4e9f6c17be) } var fileDescriptor_message_c5788c4e9f6c17be = []byte{ // 447 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0x5d, 0x6b, 0xd4, 0x40, 0x14, 0xdd, 0x64, 0x37, 0xe9, 0xf6, 0x5a, 0x3f, 0x18, 0x4b, 0x19, 0xf2, 0x10, 0x17, 0x45, 0xd9, 0x17, 0x53, 0xb1, 0x28, 0x22, 0xf4, 0x65, 0xa1, 0x08, 0xa2, 0x2f, 0x03, 0xfa, 0x9e, 0xcd, 0xde, 0xa6, 0x43, 0xb3, 0x99, 0x38, 0x33, 0x91, 0xe6, 0x5f, 0x08, 0xfe, 0x07, 0x7f, 0x4b, 0x7d, 0xeb, 0xa3, 0x4f, 0x22, 0xbb, 0x7f, 0x44, 0x72, 0x33, 0xc6, 0xaf, 0x52, 0x17, 0x7c, 0xbb, 0x67, 0x67, 0xce, 0x99, 0x73, 0xee, 0xd9, 0xc0, 0xf5, 0x25, 0x1a, 0x93, 0xe6, 0x98, 0x54, 0x5a, 0x59, 0xc5, 0x76, 0x73, 0x9d, 0x56, 0x27, 0xa6, 0x29, 0xb3, 0xa4, 0x3f, 0x98, 0x47, 0x0f, 0x73, 0x69, 0x4f, 0xea, 0x79, 0x92, 0xa9, 0xe5, 0x7e, 0xae, 0x72, 0xb5, 0x4f, 0x97, 0xe7, 0xf5, 0x31, 0x21, 0x02, 0x34, 0x75, 0x22, 0x77, 0x3f, 0x85, 0xb0, 0xf5, 0xba, 0x63, 0xb3, 0x47, 0x70, 0x3b, 0x53, 0xcb, 0xaa, 0x40, 0x8b, 0x02, 0xdf, 0xd5, 0x68, 0xec, 0x2b, 0x69, 0x2c, 0xf7, 0x26, 0xde, 0x74, 0x2c, 0x2e, 0x3b, 0x62, 0x2f, 0x60, 0xac, 0x3b, 0x68, 0xb8, 0x3f, 0x19, 0x4e, 0xaf, 0x3d, 0xbe, 0x9f, 0x5c, 0xe6, 0x2a, 0x71, 0x4f, 0x24, 0x8e, 0x3c, 0x1b, 0x9d, 0x7f, 0xbd, 0x33, 0x10, 0x3d, 0x99, 0xbd, 0x84, 0x6d, 0x8d, 0xa6, 0x52, 0xa5, 0x41, 0xc3, 0x87, 0xa4, 0xf4, 0xe0, 0x5f, 0x4a, 0xdd, 0x75, 0x27, 0xf5, 0x93, 0xce, 0x0e, 0x61, 0xb4, 0x48, 0x6d, 0xca, 0x47, 0x24, 0x73, 0xef, 0x6a, 0x99, 0x59, 0xa1, 0xb2, 0x53, 0xa7, 0x41, 0xb4, 0xe8, 0xa3, 0x0f, 0x5b, 0xce, 0x26, 0xbb, 0x01, 0xbe, 0x5c, 0xd0, 0x02, 0x02, 0xe1, 0xcb, 0x05, 0x63, 0x30, 0xd2, 0x4a, 0x59, 0xee, 0x4f, 0xbc, 0xe9, 0x8e, 0xa0, 0x99, 0x45, 0x30, 0x36, 0x58, 0x60, 0x66, 0x95, 0xe6, 0x43, 0xfa, 0xbd, 0xc7, 0xec, 0x0d, 0x00, 0x9e, 0x59, 0x2c, 0x8d, 0x54, 0xa5, 0x71, 0x86, 0x9e, 0x6c, 0xb4, 0xa1, 0xe4, 0xa8, 0xe7, 0x1d, 0x95, 0x56, 0x37, 0xe2, 0x17, 0xa1, 0xf6, 0xc9, 0x4a, 0x4b, 0xa5, 0xa5, 0x6d, 0x78, 0x40, 0xe6, 0x7a, 0xcc, 0xf6, 0x20, 0xcc, 0xd2, 0x32, 0xc3, 0x82, 0x87, 0xd4, 0x9b, 0x43, 0xd1, 0x21, 0xdc, 0xfc, 0x43, 0x92, 0xdd, 0x82, 0xe1, 0x29, 0x36, 0x14, 0x6f, 0x5b, 0xb4, 0x23, 0xdb, 0x85, 0xe0, 0x7d, 0x5a, 0xd4, 0xe8, 0x02, 0x76, 0xe0, 0xb9, 0xff, 0xcc, 0x8b, 0x3e, 0x7b, 0x30, 0xfe, 0xb1, 0xf2, 0xbf, 0xd6, 0xb2, 0x07, 0xa1, 0xb1, 0xa9, 0xad, 0x0d, 0xf1, 0x02, 0xe1, 0x10, 0x7b, 0xfb, 0x5b, 0xfc, 0xae, 0xd6, 0xa7, 0x9b, 0xd5, 0x7a, 0x55, 0xfe, 0xff, 0xcd, 0x72, 0x00, 0x01, 0xd5, 0xde, 0xfa, 0xae, 0x34, 0x1e, 0xcb, 0x33, 0xe2, 0xed, 0x08, 0x87, 0xda, 0x9a, 0xe9, 0x1f, 0xe4, 0x6a, 0x6e, 0xe7, 0x19, 0x3f, 0x5f, 0xc5, 0xde, 0xc5, 0x2a, 0xf6, 0xbe, 0xad, 0x62, 0xef, 0xc3, 0x3a, 0x1e, 0x5c, 0xac, 0xe3, 0xc1, 0x97, 0x75, 0x3c, 0x98, 0x87, 0xf4, 0x25, 0x1d, 0x7c, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x8a, 0x3b, 0xe8, 0x33, 0x9f, 0x03, 0x00, 0x00, }