From a03150703d6d9278a632dbd17957959e7048d64d Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Fri, 3 Mar 2023 13:08:38 +0300 Subject: [PATCH] fix fileproto --- commonfile/fileproto/file.pb.go | 114 ++++++++++++------------- commonfile/fileproto/protos/file.proto | 2 +- 2 files changed, 58 insertions(+), 58 deletions(-) diff --git a/commonfile/fileproto/file.pb.go b/commonfile/fileproto/file.pb.go index c9f1334e..52b1b6e0 100644 --- a/commonfile/fileproto/file.pb.go +++ b/commonfile/fileproto/file.pb.go @@ -708,7 +708,7 @@ var xxx_messageInfo_FilesDeleteResponse proto.InternalMessageInfo type FilesCheckRequest struct { SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - FileIds [][]byte `protobuf:"bytes,2,rep,name=fileIds,proto3" json:"fileIds,omitempty"` + FileIds []string `protobuf:"bytes,2,rep,name=fileIds,proto3" json:"fileIds,omitempty"` } func (m *FilesCheckRequest) Reset() { *m = FilesCheckRequest{} } @@ -751,7 +751,7 @@ func (m *FilesCheckRequest) GetSpaceId() string { return "" } -func (m *FilesCheckRequest) GetFileIds() [][]byte { +func (m *FilesCheckRequest) GetFileIds() []string { if m != nil { return m.FileIds } @@ -1031,53 +1031,53 @@ func init() { } var fileDescriptor_fd665a7e11c833d5 = []byte{ - // 730 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcd, 0x6e, 0xd3, 0x40, - 0x10, 0x8e, 0x13, 0x93, 0x26, 0x93, 0xfe, 0x38, 0xdb, 0x52, 0x82, 0x1b, 0xac, 0xc8, 0x07, 0x54, - 0x55, 0x28, 0x95, 0x0a, 0x87, 0x5e, 0x7a, 0x68, 0xd2, 0x1f, 0x42, 0xa5, 0x82, 0x5c, 0x21, 0x04, - 0x9c, 0x1c, 0x7b, 0x43, 0x4d, 0x5d, 0x6f, 0xf0, 0x6e, 0xa0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ab, - 0xb0, 0x32, 0x09, 0x22, 0xc0, 0x3b, 0x80, 0x62, 0x7b, 0xf7, 0x14, 0x3b, 0x67, 0x0f, 0xc3, 0xee, - 0x27, 0x02, 0x05, 0x86, 0x28, 0xef, 0x11, 0xa0, 0x3e, 0x37, 0xef, 0x7e, 0xb7, 0x3d, 0xdf, 0xee, - 0x7b, 0xbe, 0xc7, 0x2e, 0x1b, 0x4a, 0xab, 0xb4, 0x5e, 0xdb, 0x5a, 0x6b, 0x27, 0x8d, 0x6d, 0xf3, - 0x54, 0x39, 0xc4, 0xca, 0x49, 0x33, 0x3f, 0x8b, 0xca, 0xc8, 0xc6, 0x9c, 0x06, 0xbe, 0x82, 0x32, - 0x65, 0x36, 0x1b, 0x51, 0x5e, 0xfe, 0xc5, 0xad, 0x66, 0xca, 0x23, 0x67, 0x9e, 0xf0, 0x18, 0x4b, - 0xc4, 0x9a, 0x1f, 0x05, 0x38, 0xed, 0x78, 0x81, 0xfb, 0xf0, 0x1e, 0x27, 0xb5, 0x29, 0x49, 0xb5, - 0x59, 0x49, 0xea, 0x1b, 0x43, 0x8b, 0xaa, 0xbf, 0x06, 0x74, 0x10, 0xe9, 0xba, 0x6f, 0x47, 0x1b, - 0x30, 0x17, 0x73, 0x24, 0x85, 0x4f, 0xae, 0xe6, 0x63, 0x58, 0x9e, 0x40, 0x12, 0x04, 0x87, 0x50, - 0xe7, 0xe6, 0x7b, 0x76, 0xf5, 0x6e, 0x7c, 0x5b, 0x28, 0xfd, 0x8f, 0xad, 0x5d, 0x84, 0x79, 0x59, - 0xa6, 0x79, 0x04, 0x0b, 0x93, 0x6c, 0x3a, 0x54, 0x84, 0x50, 0xca, 0x39, 0xaa, 0xd6, 0xf8, 0x8e, - 0x0c, 0x00, 0xdb, 0xf7, 0xc9, 0x8f, 0x0f, 0xa1, 0xc7, 0x30, 0xef, 0x47, 0xc5, 0x92, 0x2c, 0xe6, - 0x0b, 0xd0, 0x4e, 0x78, 0x6c, 0x30, 0x20, 0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d2, 0xca, 0x41, 0xcd, - 0xa9, 0xd8, 0x89, 0x77, 0xaf, 0x3f, 0xbb, 0xc3, 0x2b, 0xb0, 0x0e, 0x01, 0xd2, 0x11, 0x45, 0xd3, - 0xb4, 0xf2, 0x4e, 0xd0, 0x9b, 0xf9, 0xce, 0x54, 0x94, 0x34, 0x8b, 0xb2, 0xa8, 0xec, 0xb0, 0xcb, - 0xa2, 0x72, 0x06, 0x38, 0x12, 0x95, 0xce, 0x9d, 0x2c, 0x2a, 0x33, 0xd6, 0x7a, 0x33, 0xdf, 0x29, - 0x80, 0xb6, 0xe1, 0x51, 0x8c, 0xb1, 0x9a, 0x86, 0x4d, 0xa4, 0x3f, 0xc9, 0xd8, 0xd3, 0x4e, 0x8d, - 0x67, 0x41, 0xee, 0xd4, 0xf4, 0x3c, 0xc9, 0x9d, 0xca, 0x0c, 0x4f, 0xa7, 0x7d, 0x75, 0x63, 0x28, - 0xd7, 0x37, 0x86, 0xf2, 0xf7, 0xc6, 0x50, 0x7e, 0xde, 0x1a, 0x85, 0xeb, 0x5b, 0xa3, 0xf0, 0xe7, - 0xd6, 0x28, 0x7c, 0x5a, 0xc9, 0xfb, 0x0f, 0xd0, 0x2f, 0xf3, 0x9f, 0x97, 0xff, 0x02, 0x00, 0x00, - 0xff, 0xff, 0xa2, 0x2c, 0x2b, 0x73, 0x22, 0x08, 0x00, 0x00, + // 733 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcb, 0x6e, 0xd3, 0x4c, + 0x14, 0x8e, 0x13, 0xff, 0x69, 0x7c, 0xd2, 0x8b, 0x33, 0xed, 0x5f, 0x82, 0x1b, 0xac, 0xc8, 0x0b, + 0x54, 0x55, 0x28, 0x95, 0x0a, 0x8b, 0x6e, 0xba, 0x68, 0xd2, 0x0b, 0xa1, 0x52, 0x41, 0xae, 0x10, + 0x02, 0x56, 0x8e, 0x3d, 0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b, 0xac, 0x15, 0xfa, 0x04, 0xca, 0x2b, 0xa8, 0x4b, + 0x2b, 0x07, 0xb5, 0x66, 0x62, 0xa7, 0xde, 0xbd, 0xf1, 0xe4, 0x2f, 0x5e, 0x81, 0x75, 0x08, 0x90, + 0x8d, 0x28, 0x9a, 0xa5, 0x95, 0x77, 0x82, 0xd1, 0x2a, 0x76, 0x66, 0xa2, 0xa4, 0x59, 0x94, 0x45, + 0xe5, 0x87, 0x5d, 0x16, 0x55, 0x30, 0xc0, 0xb1, 0xa8, 0x6c, 0xee, 0x64, 0x51, 0xb9, 0xb1, 0x36, + 0x5a, 0xc5, 0x4e, 0x01, 0xb4, 0x0d, 0xff, 0x25, 0x18, 0xab, 0x59, 0xd8, 0x54, 0xfa, 0xa3, 0x9c, + 0x3d, 0xeb, 0xd4, 0x64, 0x16, 0xe4, 0x4e, 0xcd, 0xce, 0x93, 0xdc, 0xa9, 0xdc, 0xf0, 0x74, 0x3b, + 0x57, 0x37, 0xa6, 0x72, 0x7d, 0x63, 0x2a, 0xbf, 0x6f, 0x4c, 0xe5, 0xfb, 0xad, 0x59, 0xba, 0xbe, + 0x35, 0x4b, 0xbf, 0x6e, 0xcd, 0xd2, 0x87, 0x95, 0xa2, 0xff, 0x00, 0x83, 0x2a, 0xff, 0x79, 0xfe, + 0x27, 0x00, 0x00, 0xff, 0xff, 0x80, 0x0a, 0x65, 0xcb, 0x22, 0x08, 0x00, 0x00, } func (m *BlockGetRequest) Marshal() (dAtA []byte, err error) { @@ -1974,8 +1974,8 @@ func (m *FilesCheckRequest) Size() (n int) { n += 1 + l + sovFile(uint64(l)) } if len(m.FileIds) > 0 { - for _, b := range m.FileIds { - l = len(b) + for _, s := range m.FileIds { + l = len(s) n += 1 + l + sovFile(uint64(l)) } } @@ -3420,7 +3420,7 @@ func (m *FilesCheckRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field FileIds", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFile @@ -3430,23 +3430,23 @@ func (m *FilesCheckRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthFile } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthFile } if postIndex > l { return io.ErrUnexpectedEOF } - m.FileIds = append(m.FileIds, make([]byte, postIndex-iNdEx)) - copy(m.FileIds[len(m.FileIds)-1], dAtA[iNdEx:postIndex]) + m.FileIds = append(m.FileIds, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex diff --git a/commonfile/fileproto/protos/file.proto b/commonfile/fileproto/protos/file.proto index db30a1f1..3bb7c05e 100644 --- a/commonfile/fileproto/protos/file.proto +++ b/commonfile/fileproto/protos/file.proto @@ -93,7 +93,7 @@ message FilesDeleteResponse {} message FilesCheckRequest { string spaceId = 1; - repeated bytes fileIds = 2; + repeated string fileIds = 2; } message FilesCheckResponse {