Fix proto

This commit is contained in:
mcrakhman 2023-04-20 00:04:16 +02:00 committed by Mikhail Iudin
parent 0d514560a4
commit 4a22eabebd
No known key found for this signature in database
GPG Key ID: FAAAA8BAABDFF1C0
2 changed files with 101 additions and 48 deletions

View File

@ -101,7 +101,8 @@ message TreeFullSyncResponse {
// TreeErrorResponse is an error sent as a response for a full sync request
message TreeErrorResponse {
uint64 errCode = 1;
string error = 1;
uint64 errCode = 2;
}
// TreeChangeInfo is used internally in Tree implementation for ease of marshalling

View File

@ -722,7 +722,8 @@ func (m *TreeFullSyncResponse) GetSnapshotPath() []string {
// TreeErrorResponse is an error sent as a response for a full sync request
type TreeErrorResponse struct {
ErrCode uint64 `protobuf:"varint,1,opt,name=errCode,proto3" json:"errCode,omitempty"`
Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
ErrCode uint64 `protobuf:"varint,2,opt,name=errCode,proto3" json:"errCode,omitempty"`
}
func (m *TreeErrorResponse) Reset() { *m = TreeErrorResponse{} }
@ -758,6 +759,13 @@ func (m *TreeErrorResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_TreeErrorResponse proto.InternalMessageInfo
func (m *TreeErrorResponse) GetError() string {
if m != nil {
return m.Error
}
return ""
}
func (m *TreeErrorResponse) GetErrCode() uint64 {
if m != nil {
return m.ErrCode
@ -838,53 +846,54 @@ func init() {
}
var fileDescriptor_5033f0301ef9b772 = []byte{
// 732 bytes of a gzipped FileDescriptorProto
// 741 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0x4f, 0x4f, 0xfb, 0x46,
0x10, 0xf5, 0x3a, 0x81, 0x90, 0x49, 0x08, 0xe9, 0xc2, 0xc1, 0x42, 0xad, 0x6b, 0x59, 0x55, 0x1b,
0x55, 0x2a, 0x48, 0xf4, 0xd4, 0xaa, 0x12, 0x2a, 0x29, 0x90, 0x08, 0xb5, 0x45, 0xcb,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, 0x96, 0x6e, 0x80,
0xa5, 0x33, 0xdb, 0x5c, 0x71, 0x66, 0x7f, 0x7b, 0x03, 0xa0, 0x84, 0xa5, 0x8b, 0x08, 0xda, 0x02,
0xb8, 0x0a, 0xf1, 0xef, 0x18, 0x3d, 0x89, 0x7e, 0xdb, 0xa0, 0x6d, 0x68, 0x9e, 0xa2, 0x9c, 0xab,
0x6f, 0x13, 0x6a, 0xc1, 0x4e, 0x69, 0xc4, 0xfa, 0x8d, 0x49, 0xdb, 0xd0, 0x50, 0x8f, 0xbf, 0x0d,
0x06, 0x02, 0x65, 0xfb, 0xb1, 0x72, 0xf4, 0xd3, 0x87, 0x17, 0x9b, 0x3c, 0xbd, 0xd8, 0xe4, 0xe3,
0x8b, 0x4d, 0x1e, 0x5f, 0x6d, 0xe3, 0xe9, 0xd5, 0x36, 0x9e, 0x5f, 0x6d, 0xe3, 0xe6, 0x9b, 0x37,
0xde, 0xa8, 0xb7, 0xeb, 0xea, 0xef, 0xbb, 0x4f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x1b, 0x35, 0x02,
0x10, 0x83, 0x07, 0x00, 0x00,
}
func (m *RootChange) Marshal() (dAtA []byte, err error) {
@ -1464,7 +1473,14 @@ func (m *TreeErrorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
if m.ErrCode != 0 {
i = encodeVarintTreechange(dAtA, i, uint64(m.ErrCode))
i--
dAtA[i] = 0x8
dAtA[i] = 0x10
}
if len(m.Error) > 0 {
i -= len(m.Error)
copy(dAtA[i:], m.Error)
i = encodeVarintTreechange(dAtA, i, uint64(len(m.Error)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
@ -1792,6 +1808,10 @@ func (m *TreeErrorResponse) Size() (n int) {
}
var l int
_ = l
l = len(m.Error)
if l > 0 {
n += 1 + l + sovTreechange(uint64(l))
}
if m.ErrCode != 0 {
n += 1 + sovTreechange(uint64(m.ErrCode))
}
@ -3393,6 +3413,38 @@ func (m *TreeErrorResponse) Unmarshal(dAtA []byte) error {
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTreechange
}
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 ErrInvalidLengthTreechange
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthTreechange
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Error = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ErrCode", wireType)
}