Commit 7bf56788 authored by Steven Allen's avatar Steven Allen

chore(proto): regenerate protobuf code

parent a737dfb6
......@@ -9,6 +9,7 @@ import (
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.
......@@ -20,7 +21,7 @@ var _ = math.Inf
// 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
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type Message struct {
Wantlist Message_Wantlist `protobuf:"bytes,1,opt,name=wantlist,proto3" json:"wantlist"`
......@@ -42,7 +43,7 @@ func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Message.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
......@@ -101,7 +102,7 @@ func (m *Message_Wantlist) XXX_Marshal(b []byte, deterministic bool) ([]byte, er
return xxx_messageInfo_Message_Wantlist.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
......@@ -154,7 +155,7 @@ func (m *Message_Wantlist_Entry) XXX_Marshal(b []byte, deterministic bool) ([]by
return xxx_messageInfo_Message_Wantlist_Entry.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
......@@ -213,7 +214,7 @@ func (m *Message_Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error
return xxx_messageInfo_Message_Block.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
......@@ -283,7 +284,7 @@ var fileDescriptor_33c57e4bae7b9afd = []byte{
func (m *Message) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
......@@ -291,45 +292,55 @@ func (m *Message) Marshal() (dAtA []byte, err error) {
}
func (m *Message) MarshalTo(dAtA []byte) (int, error) {
var i int
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Message) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
dAtA[i] = 0xa
i++
i = encodeVarintMessage(dAtA, i, uint64(m.Wantlist.Size()))
n1, err := m.Wantlist.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
if len(m.Payload) > 0 {
for iNdEx := len(m.Payload) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Payload[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintMessage(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
}
}
i += n1
if len(m.Blocks) > 0 {
for _, b := range m.Blocks {
for iNdEx := len(m.Blocks) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Blocks[iNdEx])
copy(dAtA[i:], m.Blocks[iNdEx])
i = encodeVarintMessage(dAtA, i, uint64(len(m.Blocks[iNdEx])))
i--
dAtA[i] = 0x12
i++
i = encodeVarintMessage(dAtA, i, uint64(len(b)))
i += copy(dAtA[i:], b)
}
}
if len(m.Payload) > 0 {
for _, msg := range m.Payload {
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
{
size, err := m.Wantlist.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintMessage(dAtA, i, uint64(size))
}
return i, nil
i--
dAtA[i] = 0xa
return len(dAtA) - i, nil
}
func (m *Message_Wantlist) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
......@@ -337,39 +348,46 @@ func (m *Message_Wantlist) Marshal() (dAtA []byte, err error) {
}
func (m *Message_Wantlist) MarshalTo(dAtA []byte) (int, error) {
var i int
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Message_Wantlist) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Entries) > 0 {
for _, msg := range m.Entries {
dAtA[i] = 0xa
i++
i = encodeVarintMessage(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if m.Full {
dAtA[i] = 0x10
i++
i--
if m.Full {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i++
i--
dAtA[i] = 0x10
}
if len(m.Entries) > 0 {
for iNdEx := len(m.Entries) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Entries[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintMessage(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
}
return i, nil
return len(dAtA) - i, nil
}
func (m *Message_Wantlist_Entry) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
......@@ -377,38 +395,44 @@ func (m *Message_Wantlist_Entry) Marshal() (dAtA []byte, err error) {
}
func (m *Message_Wantlist_Entry) MarshalTo(dAtA []byte) (int, error) {
var i int
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Message_Wantlist_Entry) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Block) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintMessage(dAtA, i, uint64(len(m.Block)))
i += copy(dAtA[i:], m.Block)
}
if m.Priority != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintMessage(dAtA, i, uint64(m.Priority))
}
if m.Cancel {
dAtA[i] = 0x18
i++
i--
if m.Cancel {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i++
i--
dAtA[i] = 0x18
}
if m.Priority != 0 {
i = encodeVarintMessage(dAtA, i, uint64(m.Priority))
i--
dAtA[i] = 0x10
}
if len(m.Block) > 0 {
i -= len(m.Block)
copy(dAtA[i:], m.Block)
i = encodeVarintMessage(dAtA, i, uint64(len(m.Block)))
i--
dAtA[i] = 0xa
}
return i, nil
return len(dAtA) - i, nil
}
func (m *Message_Block) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
......@@ -416,33 +440,42 @@ func (m *Message_Block) Marshal() (dAtA []byte, err error) {
}
func (m *Message_Block) MarshalTo(dAtA []byte) (int, error) {
var i int
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Message_Block) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = 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 -= len(m.Data)
copy(dAtA[i:], m.Data)
i = encodeVarintMessage(dAtA, i, uint64(len(m.Data)))
i += copy(dAtA[i:], m.Data)
i--
dAtA[i] = 0x12
}
if len(m.Prefix) > 0 {
i -= len(m.Prefix)
copy(dAtA[i:], m.Prefix)
i = encodeVarintMessage(dAtA, i, uint64(len(m.Prefix)))
i--
dAtA[i] = 0xa
}
return i, nil
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 offset + 1
return base
}
func (m *Message) Size() (n int) {
if m == nil {
......@@ -522,14 +555,7 @@ func (m *Message_Block) Size() (n int) {
}
func sovMessage(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
return (math_bits.Len64(x|1) + 6) / 7
}
func sozMessage(x uint64) (n int) {
return sovMessage(uint64((x << 1) ^ uint64((int64(x) >> 63))))
......@@ -1043,6 +1069,7 @@ func (m *Message_Block) Unmarshal(dAtA []byte) error {
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 {
......@@ -1074,10 +1101,8 @@ func skipMessage(dAtA []byte) (n int, err error) {
break
}
}
return iNdEx, nil
case 1:
iNdEx += 8
return iNdEx, nil
case 2:
var length int
for shift := uint(0); ; shift += 7 {
......@@ -1098,55 +1123,30 @@ func skipMessage(dAtA []byte) (n int, err error) {
return 0, ErrInvalidLengthMessage
}
iNdEx += length
if iNdEx < 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
if iNdEx < 0 {
return 0, ErrInvalidLengthMessage
}
}
return iNdEx, nil
depth++
case 4:
return iNdEx, nil
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupMessage
}
depth--
case 5:
iNdEx += 4
return iNdEx, nil
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthMessage
}
if depth == 0 {
return iNdEx, nil
}
}
panic("unreachable")
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthMessage = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowMessage = fmt.Errorf("proto: integer overflow")
ErrInvalidLengthMessage = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowMessage = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupMessage = fmt.Errorf("proto: unexpected end of group")
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment