diff --git a/commonfile/fileproto/file.pb.go b/commonfile/fileproto/file.pb.go index b00856eb..b4f3f839 100644 --- a/commonfile/fileproto/file.pb.go +++ b/commonfile/fileproto/file.pb.go @@ -603,7 +603,8 @@ func (m *BlocksBindResponse) XXX_DiscardUnknown() { var xxx_messageInfo_BlocksBindResponse proto.InternalMessageInfo type FilesBindRequest struct { - FileCids [][]byte `protobuf:"bytes,1,rep,name=fileCids,proto3" json:"fileCids,omitempty"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + FileCids [][]byte `protobuf:"bytes,2,rep,name=fileCids,proto3" json:"fileCids,omitempty"` } func (m *FilesBindRequest) Reset() { *m = FilesBindRequest{} } @@ -639,6 +640,13 @@ func (m *FilesBindRequest) XXX_DiscardUnknown() { var xxx_messageInfo_FilesBindRequest proto.InternalMessageInfo +func (m *FilesBindRequest) GetSpaceId() string { + if m != nil { + return m.SpaceId + } + return "" +} + func (m *FilesBindRequest) GetFileCids() [][]byte { if m != nil { return m.FileCids @@ -683,7 +691,8 @@ func (m *FilesBindResponse) XXX_DiscardUnknown() { var xxx_messageInfo_FilesBindResponse proto.InternalMessageInfo type FilesDeleteRequest struct { - FileCids [][]byte `protobuf:"bytes,1,rep,name=fileCids,proto3" json:"fileCids,omitempty"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + FileCids [][]byte `protobuf:"bytes,2,rep,name=fileCids,proto3" json:"fileCids,omitempty"` } func (m *FilesDeleteRequest) Reset() { *m = FilesDeleteRequest{} } @@ -719,6 +728,13 @@ func (m *FilesDeleteRequest) XXX_DiscardUnknown() { var xxx_messageInfo_FilesDeleteRequest proto.InternalMessageInfo +func (m *FilesDeleteRequest) GetSpaceId() string { + if m != nil { + return m.SpaceId + } + return "" +} + func (m *FilesDeleteRequest) GetFileCids() [][]byte { if m != nil { return m.FileCids @@ -763,7 +779,8 @@ func (m *FilesDeleteResponse) XXX_DiscardUnknown() { var xxx_messageInfo_FilesDeleteResponse proto.InternalMessageInfo type FilesCheckRequest struct { - FileCids [][]byte `protobuf:"bytes,1,rep,name=fileCids,proto3" json:"fileCids,omitempty"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + FileCids [][]byte `protobuf:"bytes,2,rep,name=fileCids,proto3" json:"fileCids,omitempty"` } func (m *FilesCheckRequest) Reset() { *m = FilesCheckRequest{} } @@ -799,6 +816,13 @@ func (m *FilesCheckRequest) XXX_DiscardUnknown() { var xxx_messageInfo_FilesCheckRequest proto.InternalMessageInfo +func (m *FilesCheckRequest) GetSpaceId() string { + if m != nil { + return m.SpaceId + } + return "" +} + func (m *FilesCheckRequest) GetFileCids() [][]byte { if m != nil { return m.FileCids @@ -1073,53 +1097,53 @@ func init() { } var fileDescriptor_fd665a7e11c833d5 = []byte{ - // 734 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcb, 0x4e, 0xdb, 0x4c, - 0x14, 0x8e, 0x93, 0xc0, 0x9f, 0x9c, 0x70, 0x31, 0x07, 0x7e, 0x9a, 0x9a, 0xd4, 0x8a, 0xbc, 0xa8, - 0x10, 0x52, 0x43, 0x45, 0xbb, 0x60, 0xc3, 0x82, 0x84, 0x8b, 0x28, 0x2a, 0xad, 0x8c, 0x50, 0xa5, - 0x76, 0xe5, 0xd8, 0x43, 0xb1, 0x30, 0x76, 0xea, 0x99, 0xb4, 0xf0, 0x16, 0x7d, 0x2c, 0x96, 0x74, - 0xd7, 0x65, 0x05, 0x2f, 0x52, 0xcd, 0x78, 0x12, 0x8f, 0x63, 0x03, 0x12, 0x52, 0x37, 0xe6, 0xcc, - 0xb9, 0x7c, 0xe7, 0x36, 0xdf, 0x10, 0x78, 0xe9, 0x46, 0x17, 0x17, 0x51, 0x78, 0xea, 0x07, 0x64, - 0x9d, 0x7f, 0x06, 0x71, 0xc4,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0x1e, 0x66, 0xd4, 0x7f, 0x0e, 0x98, 0x1b, 0x69, 0xb6, - 0x2c, 0xf3, 0x3e, 0xb3, 0x84, 0xdb, 0x84, 0xa9, 0xa4, 0xa4, 0xe5, 0xd4, 0x31, 0x53, 0xcd, 0xb3, - 0x9c, 0x3e, 0xed, 0x28, 0x65, 0xa0, 0xda, 0x51, 0x8e, 0xc6, 0x6a, 0x47, 0x79, 0xd2, 0x76, 0x3b, - 0xd7, 0xb7, 0xa6, 0x76, 0x73, 0x6b, 0x6a, 0x7f, 0x6e, 0x4d, 0xed, 0xe7, 0x9d, 0x59, 0xba, 0xb9, - 0x33, 0x4b, 0xbf, 0xef, 0xcc, 0xd2, 0xe7, 0xa5, 0xa2, 0x5f, 0x18, 0xfd, 0x69, 0xf1, 0xe7, 0xcd, - 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa8, 0x36, 0xfc, 0xdf, 0x80, 0x08, 0x00, 0x00, + // 736 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4b, 0x4f, 0xdb, 0x40, + 0x10, 0x8e, 0x93, 0x40, 0x93, 0x09, 0x0f, 0x33, 0x50, 0x9a, 0x9a, 0xd4, 0x8a, 0x7c, 0xa8, 0x10, + 0x52, 0x83, 0x44, 0x7b, 0xe0, 0xc2, 0x81, 0x84, 0x47, 0x03, 0x2a, 0xad, 0x8c, 0x50, 0xa5, 0xf6, + 0xe4, 0xd8, 0x4b, 0xb1, 0x30, 0x76, 0xea, 0xdd, 0xb4, 0xf0, 0x2f, 0xfa, 0xb3, 0x38, 0xd2, 0x5b, + 0x8f, 0x15, 0xfc, 0x91, 0xca, 0xeb, 0x4d, 0xbc, 0x8e, 0xcd, 0x43, 0x91, 0x7a, 0x31, 0xbb, 0xf3, + 0xf8, 0xbe, 0x99, 0xd9, 0x99, 0x21, 0xf0, 0xda, 0x0e, 0x2e, 0x2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x60, + 0x8b, 0xbb, 0xca, 0x26, 0x66, 0x8e, 0x9b, 0xf1, 0x55, 0x54, 0x46, 0x16, 0xe6, 0x3c, 0xd4, 0x3b, + 0x98, 0xa6, 0xcc, 0x62, 0x03, 0xca, 0x2b, 0x3d, 0xb7, 0xd1, 0x48, 0x78, 0x64, 0xcf, 0x63, 0x6e, + 0x63, 0x0a, 0x5b, 0x63, 0x5b, 0x80, 0xd3, 0xb6, 0xeb, 0x3b, 0x93, 0xd5, 0x60, 0x69, 0x58, 0xc7, + 0x18, 0x42, 0x54, 0xf7, 0x3d, 0xa8, 0x7b, 0x11, 0xff, 0xd3, 0x70, 0x35, 0xe0, 0x6d, 0xdd, 0x49, + 0xb0, 0x47, 0xf7, 0xa8, 0x33, 0x24, 0x24, 0x01, 0x7f, 0x00, 0xc8, 0x85, 0x4f, 0x6d, 0x8c, 0x87, + 0x08, 0x9e, 0xc3, 0x62, 0x0a, 0x4b, 0x50, 0x74, 0x05, 0xef, 0x13, 0xdb, 0xe3, 0x21, 0x06, 0x4b, + 0x44, 0xfb, 0x1f, 0xbb, 0x64, 0x0e, 0x66, 0xe4, 0x40, 0x8d, 0x43, 0x98, 0x4d, 0xb3, 0x69, 0x50, + 0x11, 0xa1, 0x52, 0xce, 0x51, 0x35, 0x47, 0x77, 0xd4, 0x01, 0x2c, 0xcf, 0x0b, 0x7e, 0x7e, 0x0e, + 0x5d, 0x46, 0x78, 0xff, 0x54, 0x4c, 0x49, 0x62, 0xbc, 0x81, 0x05, 0x0e, 0x76, 0x42, 0xad, 0x6f, + 0x8f, 0x17, 0xdb, 0x08, 0x01, 0x65, 0x73, 0x11, 0x80, 0x0e, 0xe0, 0xb9, 0x17, 0x2e, 0x6b, 0x5f, + 0x31, 0x42, 0xb9, 0x4b, 0xd9, 0x94, 0x24, 0x91, 0x7e, 0x10, 0x39, 0xc4, 0xfa, 0x62, 0xac, 0x4f, + 0x24, 0xd8, 0x80, 0x2a, 0xbf, 0xf1, 0x0a, 0x97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, 0x78, 0xe2, + 0x38, 0x6d, 0xaa, 0x48, 0x8d, 0x7c, 0xa5, 0x00, 0xfa, 0x00, 0x33, 0xf2, 0xbf, 0x1a, 0xcc, 0x94, + 0x34, 0x1d, 0x96, 0x7e, 0x9f, 0x5a, 0xc0, 0x6d, 0xc2, 0x54, 0x1c, 0xd2, 0x72, 0x62, 0x98, 0x8a, + 0xe6, 0x45, 0x46, 0x9e, 0x64, 0x94, 0x4c, 0xa0, 0x9c, 0x51, 0x66, 0x8c, 0xe5, 0x8c, 0xb2, 0x43, + 0xdb, 0x6e, 0x5d, 0xdf, 0xea, 0xca, 0xcd, 0xad, 0xae, 0xfc, 0xbd, 0xd5, 0x95, 0x5f, 0x77, 0x7a, + 0xe1, 0xe6, 0x4e, 0x2f, 0xfc, 0xb9, 0xd3, 0x0b, 0x5f, 0x96, 0xf2, 0x7e, 0xaf, 0xf4, 0xa6, 0xf9, + 0x9f, 0xb7, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x1c, 0xe7, 0x92, 0xe6, 0xce, 0x08, 0x00, 0x00, } func (m *BlockGetRequest) Marshal() (dAtA []byte, err error) { @@ -1524,9 +1548,16 @@ func (m *FilesBindRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.FileCids[iNdEx]) i = encodeVarintFile(dAtA, i, uint64(len(m.FileCids[iNdEx]))) i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 } } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = encodeVarintFile(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -1579,9 +1610,16 @@ func (m *FilesDeleteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.FileCids[iNdEx]) i = encodeVarintFile(dAtA, i, uint64(len(m.FileCids[iNdEx]))) i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 } } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = encodeVarintFile(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -1634,9 +1672,16 @@ func (m *FilesCheckRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.FileCids[iNdEx]) i = encodeVarintFile(dAtA, i, uint64(len(m.FileCids[iNdEx]))) i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 } } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = encodeVarintFile(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -1997,6 +2042,10 @@ func (m *FilesBindRequest) Size() (n int) { } var l int _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + sovFile(uint64(l)) + } if len(m.FileCids) > 0 { for _, b := range m.FileCids { l = len(b) @@ -2021,6 +2070,10 @@ func (m *FilesDeleteRequest) Size() (n int) { } var l int _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + sovFile(uint64(l)) + } if len(m.FileCids) > 0 { for _, b := range m.FileCids { l = len(b) @@ -2045,6 +2098,10 @@ func (m *FilesCheckRequest) Size() (n int) { } var l int _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + sovFile(uint64(l)) + } if len(m.FileCids) > 0 { for _, b := range m.FileCids { l = len(b) @@ -3226,6 +3283,38 @@ func (m *FilesBindRequest) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFile + } + 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 ErrInvalidLengthFile + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFile + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field FileCids", wireType) } @@ -3358,6 +3447,38 @@ func (m *FilesDeleteRequest) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFile + } + 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 ErrInvalidLengthFile + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFile + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field FileCids", wireType) } @@ -3490,6 +3611,38 @@ func (m *FilesCheckRequest) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFile + } + 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 ErrInvalidLengthFile + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFile + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field FileCids", wireType) } diff --git a/commonfile/fileproto/protos/file.proto b/commonfile/fileproto/protos/file.proto index a7c58b61..394daf7e 100644 --- a/commonfile/fileproto/protos/file.proto +++ b/commonfile/fileproto/protos/file.proto @@ -87,19 +87,22 @@ message BlocksBindResponse {} message FilesBindRequest { - repeated bytes fileCids = 1; + string spaceId = 1; + repeated bytes fileCids = 2; } message FilesBindResponse {} message FilesDeleteRequest { - repeated bytes fileCids = 1; + string spaceId = 1; + repeated bytes fileCids = 2; } message FilesDeleteResponse {} message FilesCheckRequest { - repeated bytes fileCids = 1; + string spaceId = 1; + repeated bytes fileCids = 2; } message FilesCheckResponse {