diff --git a/commonfile/fileproto/file.pb.go b/commonfile/fileproto/file.pb.go index b4f3f839..8967ddf1 100644 --- a/commonfile/fileproto/file.pb.go +++ b/commonfile/fileproto/file.pb.go @@ -184,8 +184,9 @@ func (m *BlockGetResponse) GetData() []byte { type BlockPushRequest struct { SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - Cid []byte `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,omitempty"` - Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + FileId string `protobuf:"bytes,2,opt,name=fileId,proto3" json:"fileId,omitempty"` + Cid []byte `protobuf:"bytes,3,opt,name=cid,proto3" json:"cid,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` } func (m *BlockPushRequest) Reset() { *m = BlockPushRequest{} } @@ -228,6 +229,13 @@ func (m *BlockPushRequest) GetSpaceId() string { return "" } +func (m *BlockPushRequest) GetFileId() string { + if m != nil { + return m.FileId + } + return "" +} + func (m *BlockPushRequest) GetCid() []byte { if m != nil { return m.Cid @@ -516,7 +524,8 @@ func (m *BlockAvailability) GetStatus() AvailabilityStatus { type BlocksBindRequest struct { SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - Cids [][]byte `protobuf:"bytes,2,rep,name=cids,proto3" json:"cids,omitempty"` + FileId string `protobuf:"bytes,2,opt,name=fileId,proto3" json:"fileId,omitempty"` + Cids [][]byte `protobuf:"bytes,3,rep,name=cids,proto3" json:"cids,omitempty"` } func (m *BlocksBindRequest) Reset() { *m = BlocksBindRequest{} } @@ -559,6 +568,13 @@ func (m *BlocksBindRequest) GetSpaceId() string { return "" } +func (m *BlocksBindRequest) GetFileId() string { + if m != nil { + return m.FileId + } + return "" +} + func (m *BlocksBindRequest) GetCids() [][]byte { if m != nil { return m.Cids @@ -602,104 +618,16 @@ func (m *BlocksBindResponse) XXX_DiscardUnknown() { var xxx_messageInfo_BlocksBindResponse proto.InternalMessageInfo -type FilesBindRequest struct { - 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{} } -func (m *FilesBindRequest) String() string { return proto.CompactTextString(m) } -func (*FilesBindRequest) ProtoMessage() {} -func (*FilesBindRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{11} -} -func (m *FilesBindRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FilesBindRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FilesBindRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *FilesBindRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_FilesBindRequest.Merge(m, src) -} -func (m *FilesBindRequest) XXX_Size() int { - return m.Size() -} -func (m *FilesBindRequest) XXX_DiscardUnknown() { - xxx_messageInfo_FilesBindRequest.DiscardUnknown(m) -} - -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 - } - return nil -} - -type FilesBindResponse struct { -} - -func (m *FilesBindResponse) Reset() { *m = FilesBindResponse{} } -func (m *FilesBindResponse) String() string { return proto.CompactTextString(m) } -func (*FilesBindResponse) ProtoMessage() {} -func (*FilesBindResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{12} -} -func (m *FilesBindResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FilesBindResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FilesBindResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *FilesBindResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_FilesBindResponse.Merge(m, src) -} -func (m *FilesBindResponse) XXX_Size() int { - return m.Size() -} -func (m *FilesBindResponse) XXX_DiscardUnknown() { - xxx_messageInfo_FilesBindResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_FilesBindResponse proto.InternalMessageInfo - type FilesDeleteRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - FileCids [][]byte `protobuf:"bytes,2,rep,name=fileCids,proto3" json:"fileCids,omitempty"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + FileIds [][]byte `protobuf:"bytes,2,rep,name=fileIds,proto3" json:"fileIds,omitempty"` } func (m *FilesDeleteRequest) Reset() { *m = FilesDeleteRequest{} } func (m *FilesDeleteRequest) String() string { return proto.CompactTextString(m) } func (*FilesDeleteRequest) ProtoMessage() {} func (*FilesDeleteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{13} + return fileDescriptor_fd665a7e11c833d5, []int{11} } func (m *FilesDeleteRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -735,9 +663,9 @@ func (m *FilesDeleteRequest) GetSpaceId() string { return "" } -func (m *FilesDeleteRequest) GetFileCids() [][]byte { +func (m *FilesDeleteRequest) GetFileIds() [][]byte { if m != nil { - return m.FileCids + return m.FileIds } return nil } @@ -749,7 +677,7 @@ func (m *FilesDeleteResponse) Reset() { *m = FilesDeleteResponse{} } func (m *FilesDeleteResponse) String() string { return proto.CompactTextString(m) } func (*FilesDeleteResponse) ProtoMessage() {} func (*FilesDeleteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{14} + return fileDescriptor_fd665a7e11c833d5, []int{12} } func (m *FilesDeleteResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -779,15 +707,15 @@ func (m *FilesDeleteResponse) XXX_DiscardUnknown() { var xxx_messageInfo_FilesDeleteResponse proto.InternalMessageInfo type FilesCheckRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - FileCids [][]byte `protobuf:"bytes,2,rep,name=fileCids,proto3" json:"fileCids,omitempty"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + FileIds [][]byte `protobuf:"bytes,2,rep,name=fileIds,proto3" json:"fileIds,omitempty"` } func (m *FilesCheckRequest) Reset() { *m = FilesCheckRequest{} } func (m *FilesCheckRequest) String() string { return proto.CompactTextString(m) } func (*FilesCheckRequest) ProtoMessage() {} func (*FilesCheckRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{15} + return fileDescriptor_fd665a7e11c833d5, []int{13} } func (m *FilesCheckRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -823,9 +751,9 @@ func (m *FilesCheckRequest) GetSpaceId() string { return "" } -func (m *FilesCheckRequest) GetFileCids() [][]byte { +func (m *FilesCheckRequest) GetFileIds() [][]byte { if m != nil { - return m.FileCids + return m.FileIds } return nil } @@ -838,7 +766,7 @@ func (m *FilesCheckResponse) Reset() { *m = FilesCheckResponse{} } func (m *FilesCheckResponse) String() string { return proto.CompactTextString(m) } func (*FilesCheckResponse) ProtoMessage() {} func (*FilesCheckResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{16} + return fileDescriptor_fd665a7e11c833d5, []int{14} } func (m *FilesCheckResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -881,7 +809,7 @@ func (m *CheckRequest) Reset() { *m = CheckRequest{} } func (m *CheckRequest) String() string { return proto.CompactTextString(m) } func (*CheckRequest) ProtoMessage() {} func (*CheckRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{17} + return fileDescriptor_fd665a7e11c833d5, []int{15} } func (m *CheckRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -919,7 +847,7 @@ func (m *CheckResponse) Reset() { *m = CheckResponse{} } func (m *CheckResponse) String() string { return proto.CompactTextString(m) } func (*CheckResponse) ProtoMessage() {} func (*CheckResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{18} + return fileDescriptor_fd665a7e11c833d5, []int{16} } func (m *CheckResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -970,7 +898,7 @@ func (m *CheckUsageRequest) Reset() { *m = CheckUsageRequest{} } func (m *CheckUsageRequest) String() string { return proto.CompactTextString(m) } func (*CheckUsageRequest) ProtoMessage() {} func (*CheckUsageRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{19} + return fileDescriptor_fd665a7e11c833d5, []int{17} } func (m *CheckUsageRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1016,7 +944,7 @@ func (m *CheckUsageResponse) Reset() { *m = CheckUsageResponse{} } func (m *CheckUsageResponse) String() string { return proto.CompactTextString(m) } func (*CheckUsageResponse) ProtoMessage() {} func (*CheckUsageResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{20} + return fileDescriptor_fd665a7e11c833d5, []int{18} } func (m *CheckUsageResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1080,8 +1008,6 @@ func init() { proto.RegisterType((*BlockAvailability)(nil), "filesync.BlockAvailability") proto.RegisterType((*BlocksBindRequest)(nil), "filesync.BlocksBindRequest") proto.RegisterType((*BlocksBindResponse)(nil), "filesync.BlocksBindResponse") - proto.RegisterType((*FilesBindRequest)(nil), "filesync.FilesBindRequest") - proto.RegisterType((*FilesBindResponse)(nil), "filesync.FilesBindResponse") proto.RegisterType((*FilesDeleteRequest)(nil), "filesync.FilesDeleteRequest") proto.RegisterType((*FilesDeleteResponse)(nil), "filesync.FilesDeleteResponse") proto.RegisterType((*FilesCheckRequest)(nil), "filesync.FilesCheckRequest") @@ -1097,53 +1023,52 @@ func init() { } var fileDescriptor_fd665a7e11c833d5 = []byte{ - // 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, 0x2e, 0x02, 0xff, 0xd4, 0xf5, 0xc8, - 0x7a, 0xf4, 0xe9, 0x87, 0x01, 0x0b, 0xd6, 0xf9, 0x97, 0x72, 0x41, 0x8b, 0x9f, 0xb1, 0x12, 0x9d, - 0xe9, 0x95, 0x6f, 0x1b, 0x5b, 0x30, 0xdf, 0xf6, 0x02, 0xfb, 0x7c, 0x9f, 0x30, 0x93, 0x7c, 0x1f, - 0x10, 0xca, 0xb0, 0x0e, 0xcf, 0x68, 0xdf, 0xb2, 0x49, 0xd7, 0xa9, 0x2b, 0x4d, 0x65, 0xb5, 0x6a, - 0x0e, 0xaf, 0xa8,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xd3, 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, 0xb8, 0x3a, 0x11, 0xac, 0x6d, 0x41, 0x65, 0x37, - 0x0c, 0x3b, 0x81, 0x43, 0x28, 0xce, 0x01, 0x9c, 0xf8, 0xe4, 0xb2, 0x4f, 0x6c, 0x46, 0x1c, 0xb5, - 0x80, 0xf3, 0x50, 0xeb, 0x74, 0x77, 0x8e, 0x02, 0xb6, 0x17, 0x0c, 0x7c, 0x47, 0x55, 0x50, 0x85, - 0xda, 0x6e, 0x18, 0x06, 0xe1, 0xc7, 0xd3, 0x53, 0x4a, 0x98, 0x7a, 0xad, 0xac, 0xb5, 0x01, 0xb3, - 0x53, 0x82, 0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, 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, + // 713 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcd, 0x4e, 0xdb, 0x40, + 0x10, 0x8e, 0x93, 0x34, 0x24, 0x13, 0x7e, 0x9c, 0x85, 0xd2, 0xd4, 0xa4, 0x56, 0xe4, 0x43, 0x85, + 0x90, 0x1a, 0x24, 0xda, 0x03, 0x17, 0x0e, 0x24, 0xfc, 0x34, 0x45, 0xa2, 0x95, 0x11, 0xaa, 0xda, + 0x9e, 0x1c, 0x7b, 0x29, 0x2e, 0xc6, 0x9b, 0x7a, 0x37, 0x2d, 0xbc, 0x45, 0x1f, 0xa8, 0x0f, 0xc0, + 0x91, 0x63, 0x8f, 0x15, 0xbc, 0x48, 0xb5, 0xeb, 0x35, 0xde, 0xc4, 0x46, 0x41, 0x48, 0xbd, 0x98, + 0xd9, 0xf9, 0xf9, 0xbe, 0x8f, 0x99, 0x9d, 0x0d, 0xbc, 0x74, 0xc9, 0xf9, 0x39, 0x09, 0x4f, 0xfc, + 0x00, 0xaf, 0xf3, 0xcf, 0x30, 0x22, 0x8c, 0xac, 0x8b, 0x2f, 0x15, 0x8e, 0x8e, 0xb0, 0x51, 0x95, + 0xdb, 0xf4, 0x32, 0x74, 0xad, 0x2d, 0x58, 0xe8, 0x06, 0xc4, 0x3d, 0xdb, 0xc7, 0xcc, 0xc6, 0xdf, + 0x47, 0x98, 0x32, 0xd4, 0x84, 0x19, 0x3a, 0x74, 0x5c, 0xdc, 0xf7, 0x9a, 0x5a, 0x5b, 0x5b, 0xad, + 0xd9, 0xc9, 0x11, 0xe9, 0x50, 0x72, 0x7d, 0xaf, 0x59, 0x6c, 0x6b, 0xab, 0xb3, 0x36, 0x37, 0xad, + 0x4d, 0xd0, 0xd3, 0x72, 0x3a, 0x24, 0x21, 0xc5, 0x49, 0x96, 0x76, 0x97, 0x85, 0x10, 0x94, 0x3d, + 0x87, 0x39, 0xb2, 0x50, 0xd8, 0xd6, 0x37, 0x59, 0xf9, 0x61, 0x44, 0x4f, 0xa7, 0x33, 0x2f, 0x43, + 0x85, 0x4b, 0xee, 0xc7, 0xe4, 0x35, 0x5b, 0x9e, 0x12, 0xae, 0x52, 0x96, 0xab, 0xac, 0x70, 0x2d, + 0x42, 0x43, 0xe1, 0x8a, 0x65, 0x5a, 0x3d, 0x58, 0x14, 0x4e, 0xba, 0x83, 0x03, 0xcc, 0xf0, 0x74, + 0x0d, 0x08, 0xca, 0xae, 0xef, 0xd1, 0x66, 0xb1, 0x5d, 0xe2, 0xc8, 0xdc, 0xb6, 0x96, 0x61, 0x69, + 0x1c, 0x44, 0x82, 0x77, 0x01, 0xc5, 0xfe, 0xde, 0x29, 0x76, 0xcf, 0x1e, 0x87, 0x3d, 0x48, 0x04, + 0x4a, 0x0c, 0xd9, 0xde, 0x03, 0x40, 0x03, 0xe1, 0xde, 0xfe, 0xe1, 0xf8, 0x81, 0x33, 0xf0, 0x03, + 0x9f, 0x5d, 0x36, 0xb5, 0x76, 0x69, 0xb5, 0xbe, 0xb1, 0xd2, 0x49, 0x06, 0xdb, 0x11, 0xa5, 0x6a, + 0x8a, 0x9d, 0x53, 0x66, 0x7d, 0x91, 0x9d, 0x51, 0x9d, 0x39, 0x03, 0x7c, 0x03, 0x15, 0xca, 0x1c, + 0x36, 0xa2, 0xa2, 0xfd, 0xf3, 0x1b, 0xad, 0x94, 0x47, 0xad, 0x3c, 0x12, 0x39, 0xb6, 0xcc, 0xb5, + 0x3e, 0x49,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7, + 0x66, 0xe1, 0xf3, 0x52, 0xde, 0xef, 0xfc, 0xa0, 0x22, 0xfe, 0xbc, 0xfe, 0x17, 0x00, 0x00, 0xff, + 0xff, 0xd6, 0xbb, 0x4c, 0xbd, 0x06, 0x08, 0x00, 0x00, } func (m *BlockGetRequest) Marshal() (dAtA []byte, err error) { @@ -1245,13 +1170,20 @@ func (m *BlockPushRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Data) i = encodeVarintFile(dAtA, i, uint64(len(m.Data))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 } if len(m.Cid) > 0 { i -= len(m.Cid) copy(dAtA[i:], m.Cid) i = encodeVarintFile(dAtA, i, uint64(len(m.Cid))) i-- + dAtA[i] = 0x1a + } + if len(m.FileId) > 0 { + i -= len(m.FileId) + copy(dAtA[i:], m.FileId) + i = encodeVarintFile(dAtA, i, uint64(len(m.FileId))) + i-- dAtA[i] = 0x12 } if len(m.SpaceId) > 0 { @@ -1486,9 +1418,16 @@ func (m *BlocksBindRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Cids[iNdEx]) i = encodeVarintFile(dAtA, i, uint64(len(m.Cids[iNdEx]))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } } + if len(m.FileId) > 0 { + i -= len(m.FileId) + copy(dAtA[i:], m.FileId) + i = encodeVarintFile(dAtA, i, uint64(len(m.FileId))) + i-- + dAtA[i] = 0x12 + } if len(m.SpaceId) > 0 { i -= len(m.SpaceId) copy(dAtA[i:], m.SpaceId) @@ -1522,68 +1461,6 @@ func (m *BlocksBindResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *FilesBindRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FilesBindRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FilesBindRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.FileCids) > 0 { - for iNdEx := len(m.FileCids) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.FileCids[iNdEx]) - copy(dAtA[i:], m.FileCids[iNdEx]) - i = encodeVarintFile(dAtA, i, uint64(len(m.FileCids[iNdEx]))) - i-- - 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 -} - -func (m *FilesBindResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FilesBindResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FilesBindResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - func (m *FilesDeleteRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1604,11 +1481,11 @@ func (m *FilesDeleteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.FileCids) > 0 { - for iNdEx := len(m.FileCids) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.FileCids[iNdEx]) - copy(dAtA[i:], m.FileCids[iNdEx]) - i = encodeVarintFile(dAtA, i, uint64(len(m.FileCids[iNdEx]))) + if len(m.FileIds) > 0 { + for iNdEx := len(m.FileIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.FileIds[iNdEx]) + copy(dAtA[i:], m.FileIds[iNdEx]) + i = encodeVarintFile(dAtA, i, uint64(len(m.FileIds[iNdEx]))) i-- dAtA[i] = 0x12 } @@ -1666,11 +1543,11 @@ func (m *FilesCheckRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.FileCids) > 0 { - for iNdEx := len(m.FileCids) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.FileCids[iNdEx]) - copy(dAtA[i:], m.FileCids[iNdEx]) - i = encodeVarintFile(dAtA, i, uint64(len(m.FileCids[iNdEx]))) + if len(m.FileIds) > 0 { + for iNdEx := len(m.FileIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.FileIds[iNdEx]) + copy(dAtA[i:], m.FileIds[iNdEx]) + i = encodeVarintFile(dAtA, i, uint64(len(m.FileIds[iNdEx]))) i-- dAtA[i] = 0x12 } @@ -1910,6 +1787,10 @@ func (m *BlockPushRequest) Size() (n int) { if l > 0 { n += 1 + l + sovFile(uint64(l)) } + l = len(m.FileId) + if l > 0 { + n += 1 + l + sovFile(uint64(l)) + } l = len(m.Cid) if l > 0 { n += 1 + l + sovFile(uint64(l)) @@ -2018,6 +1899,10 @@ func (m *BlocksBindRequest) Size() (n int) { if l > 0 { n += 1 + l + sovFile(uint64(l)) } + l = len(m.FileId) + if l > 0 { + n += 1 + l + sovFile(uint64(l)) + } if len(m.Cids) > 0 { for _, b := range m.Cids { l = len(b) @@ -2036,34 +1921,6 @@ func (m *BlocksBindResponse) Size() (n int) { return n } -func (m *FilesBindRequest) Size() (n int) { - if m == nil { - return 0 - } - 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) - n += 1 + l + sovFile(uint64(l)) - } - } - return n -} - -func (m *FilesBindResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - func (m *FilesDeleteRequest) Size() (n int) { if m == nil { return 0 @@ -2074,8 +1931,8 @@ func (m *FilesDeleteRequest) Size() (n int) { if l > 0 { n += 1 + l + sovFile(uint64(l)) } - if len(m.FileCids) > 0 { - for _, b := range m.FileCids { + if len(m.FileIds) > 0 { + for _, b := range m.FileIds { l = len(b) n += 1 + l + sovFile(uint64(l)) } @@ -2102,8 +1959,8 @@ func (m *FilesCheckRequest) Size() (n int) { if l > 0 { n += 1 + l + sovFile(uint64(l)) } - if len(m.FileCids) > 0 { - for _, b := range m.FileCids { + if len(m.FileIds) > 0 { + for _, b := range m.FileIds { l = len(b) n += 1 + l + sovFile(uint64(l)) } @@ -2486,6 +2343,38 @@ func (m *BlockPushRequest) Unmarshal(dAtA []byte) error { m.SpaceId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FileId", 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.FileId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) } @@ -2519,7 +2408,7 @@ func (m *BlockPushRequest) Unmarshal(dAtA []byte) error { m.Cid = []byte{} } iNdEx = postIndex - case 3: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } @@ -3151,6 +3040,38 @@ func (m *BlocksBindRequest) Unmarshal(dAtA []byte) error { m.SpaceId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FileId", 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.FileId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Cids", wireType) } @@ -3253,170 +3174,6 @@ func (m *BlocksBindResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *FilesBindRequest) 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 ErrIntOverflowFile - } - 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: FilesBindRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FilesBindRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - 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) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFile - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthFile - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthFile - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FileCids = append(m.FileCids, make([]byte, postIndex-iNdEx)) - copy(m.FileCids[len(m.FileCids)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FilesBindResponse) 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 ErrIntOverflowFile - } - 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: FilesBindResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FilesBindResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *FilesDeleteRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3480,7 +3237,7 @@ func (m *FilesDeleteRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileCids", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FileIds", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -3507,8 +3264,8 @@ func (m *FilesDeleteRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.FileCids = append(m.FileCids, make([]byte, postIndex-iNdEx)) - copy(m.FileCids[len(m.FileCids)-1], dAtA[iNdEx:postIndex]) + m.FileIds = append(m.FileIds, make([]byte, postIndex-iNdEx)) + copy(m.FileIds[len(m.FileIds)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3644,7 +3401,7 @@ func (m *FilesCheckRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileCids", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FileIds", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -3671,8 +3428,8 @@ func (m *FilesCheckRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.FileCids = append(m.FileCids, make([]byte, postIndex-iNdEx)) - copy(m.FileCids[len(m.FileCids)-1], dAtA[iNdEx:postIndex]) + m.FileIds = append(m.FileIds, make([]byte, postIndex-iNdEx)) + copy(m.FileIds[len(m.FileIds)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/commonfile/fileproto/file_drpc.pb.go b/commonfile/fileproto/file_drpc.pb.go index bd0f833d..9c205299 100644 --- a/commonfile/fileproto/file_drpc.pb.go +++ b/commonfile/fileproto/file_drpc.pb.go @@ -44,10 +44,8 @@ type DRPCFileClient interface { BlockPush(ctx context.Context, in *BlockPushRequest) (*BlockPushResponse, error) BlocksCheck(ctx context.Context, in *BlocksCheckRequest) (*BlocksCheckResponse, error) BlocksBind(ctx context.Context, in *BlocksBindRequest) (*BlocksBindResponse, error) - FilesBind(ctx context.Context, in *FilesBindRequest) (*FilesBindResponse, error) FilesDelete(ctx context.Context, in *FilesDeleteRequest) (*FilesDeleteResponse, error) FilesCheck(ctx context.Context, in *FilesCheckRequest) (*FilesCheckResponse, error) - BlocksDelete(ctx context.Context, in *BlocksDeleteRequest) (*BlocksDeleteResponse, error) Check(ctx context.Context, in *CheckRequest) (*CheckResponse, error) CheckUsage(ctx context.Context, in *CheckUsageRequest) (*CheckUsageResponse, error) } @@ -98,15 +96,6 @@ func (c *drpcFileClient) BlocksBind(ctx context.Context, in *BlocksBindRequest) return out, nil } -func (c *drpcFileClient) FilesBind(ctx context.Context, in *FilesBindRequest) (*FilesBindResponse, error) { - out := new(FilesBindResponse) - err := c.cc.Invoke(ctx, "/filesync.File/FilesBind", drpcEncoding_File_commonfile_fileproto_protos_file_proto{}, in, out) - if err != nil { - return nil, err - } - return out, nil -} - func (c *drpcFileClient) FilesDelete(ctx context.Context, in *FilesDeleteRequest) (*FilesDeleteResponse, error) { out := new(FilesDeleteResponse) err := c.cc.Invoke(ctx, "/filesync.File/FilesDelete", drpcEncoding_File_commonfile_fileproto_protos_file_proto{}, in, out) @@ -125,15 +114,6 @@ func (c *drpcFileClient) FilesCheck(ctx context.Context, in *FilesCheckRequest) return out, nil } -func (c *drpcFileClient) BlocksDelete(ctx context.Context, in *BlocksDeleteRequest) (*BlocksDeleteResponse, error) { - out := new(BlocksDeleteResponse) - err := c.cc.Invoke(ctx, "/filesync.File/BlocksDelete", drpcEncoding_File_commonfile_fileproto_protos_file_proto{}, in, out) - if err != nil { - return nil, err - } - return out, nil -} - func (c *drpcFileClient) Check(ctx context.Context, in *CheckRequest) (*CheckResponse, error) { out := new(CheckResponse) err := c.cc.Invoke(ctx, "/filesync.File/Check", drpcEncoding_File_commonfile_fileproto_protos_file_proto{}, in, out) @@ -157,10 +137,8 @@ type DRPCFileServer interface { BlockPush(context.Context, *BlockPushRequest) (*BlockPushResponse, error) BlocksCheck(context.Context, *BlocksCheckRequest) (*BlocksCheckResponse, error) BlocksBind(context.Context, *BlocksBindRequest) (*BlocksBindResponse, error) - FilesBind(context.Context, *FilesBindRequest) (*FilesBindResponse, error) FilesDelete(context.Context, *FilesDeleteRequest) (*FilesDeleteResponse, error) FilesCheck(context.Context, *FilesCheckRequest) (*FilesCheckResponse, error) - BlocksDelete(context.Context, *BlocksDeleteRequest) (*BlocksDeleteResponse, error) Check(context.Context, *CheckRequest) (*CheckResponse, error) CheckUsage(context.Context, *CheckUsageRequest) (*CheckUsageResponse, error) } @@ -183,10 +161,6 @@ func (s *DRPCFileUnimplementedServer) BlocksBind(context.Context, *BlocksBindReq return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } -func (s *DRPCFileUnimplementedServer) FilesBind(context.Context, *FilesBindRequest) (*FilesBindResponse, error) { - return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) -} - func (s *DRPCFileUnimplementedServer) FilesDelete(context.Context, *FilesDeleteRequest) (*FilesDeleteResponse, error) { return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } @@ -195,10 +169,6 @@ func (s *DRPCFileUnimplementedServer) FilesCheck(context.Context, *FilesCheckReq return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } -func (s *DRPCFileUnimplementedServer) BlocksDelete(context.Context, *BlocksDeleteRequest) (*BlocksDeleteResponse, error) { - return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) -} - func (s *DRPCFileUnimplementedServer) Check(context.Context, *CheckRequest) (*CheckResponse, error) { return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } @@ -209,7 +179,7 @@ func (s *DRPCFileUnimplementedServer) CheckUsage(context.Context, *CheckUsageReq type DRPCFileDescription struct{} -func (DRPCFileDescription) NumMethods() int { return 10 } +func (DRPCFileDescription) NumMethods() int { return 8 } func (DRPCFileDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { switch n { @@ -250,15 +220,6 @@ func (DRPCFileDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, ) }, DRPCFileServer.BlocksBind, true case 4: - return "/filesync.File/FilesBind", drpcEncoding_File_commonfile_fileproto_protos_file_proto{}, - func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { - return srv.(DRPCFileServer). - FilesBind( - ctx, - in1.(*FilesBindRequest), - ) - }, DRPCFileServer.FilesBind, true - case 5: return "/filesync.File/FilesDelete", drpcEncoding_File_commonfile_fileproto_protos_file_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCFileServer). @@ -267,7 +228,7 @@ func (DRPCFileDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, in1.(*FilesDeleteRequest), ) }, DRPCFileServer.FilesDelete, true - case 6: + case 5: return "/filesync.File/FilesCheck", drpcEncoding_File_commonfile_fileproto_protos_file_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCFileServer). @@ -276,16 +237,7 @@ func (DRPCFileDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, in1.(*FilesCheckRequest), ) }, DRPCFileServer.FilesCheck, true - case 7: - return "/filesync.File/BlocksDelete", drpcEncoding_File_commonfile_fileproto_protos_file_proto{}, - func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { - return srv.(DRPCFileServer). - BlocksDelete( - ctx, - in1.(*BlocksDeleteRequest), - ) - }, DRPCFileServer.BlocksDelete, true - case 8: + case 6: return "/filesync.File/Check", drpcEncoding_File_commonfile_fileproto_protos_file_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCFileServer). @@ -294,7 +246,7 @@ func (DRPCFileDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, in1.(*CheckRequest), ) }, DRPCFileServer.Check, true - case 9: + case 7: return "/filesync.File/CheckUsage", drpcEncoding_File_commonfile_fileproto_protos_file_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCFileServer). @@ -376,22 +328,6 @@ func (x *drpcFile_BlocksBindStream) SendAndClose(m *BlocksBindResponse) error { return x.CloseSend() } -type DRPCFile_FilesBindStream interface { - drpc.Stream - SendAndClose(*FilesBindResponse) error -} - -type drpcFile_FilesBindStream struct { - drpc.Stream -} - -func (x *drpcFile_FilesBindStream) SendAndClose(m *FilesBindResponse) error { - if err := x.MsgSend(m, drpcEncoding_File_commonfile_fileproto_protos_file_proto{}); err != nil { - return err - } - return x.CloseSend() -} - type DRPCFile_FilesDeleteStream interface { drpc.Stream SendAndClose(*FilesDeleteResponse) error @@ -424,22 +360,6 @@ func (x *drpcFile_FilesCheckStream) SendAndClose(m *FilesCheckResponse) error { return x.CloseSend() } -type DRPCFile_BlocksDeleteStream interface { - drpc.Stream - SendAndClose(*BlocksDeleteResponse) error -} - -type drpcFile_BlocksDeleteStream struct { - drpc.Stream -} - -func (x *drpcFile_BlocksDeleteStream) SendAndClose(m *BlocksDeleteResponse) error { - if err := x.MsgSend(m, drpcEncoding_File_commonfile_fileproto_protos_file_proto{}); err != nil { - return err - } - return x.CloseSend() -} - type DRPCFile_CheckStream interface { drpc.Stream SendAndClose(*CheckResponse) error diff --git a/commonfile/fileproto/protos/file.proto b/commonfile/fileproto/protos/file.proto index 394daf7e..63d1e265 100644 --- a/commonfile/fileproto/protos/file.proto +++ b/commonfile/fileproto/protos/file.proto @@ -18,14 +18,10 @@ service File { rpc BlocksCheck(BlocksCheckRequest) returns (BlocksCheckResponse); // BlocksBind binds CIDs to space rpc BlocksBind(BlocksBindRequest) returns (BlocksBindResponse); - // FilesBind binds root file CIDs and their children to space - rpc FilesBind(FilesBindRequest) returns (FilesBindResponse); - // FilesDelete deletes file CIDs and their children from space + // FilesDelete deletes files by id rpc FilesDelete(FilesDeleteRequest) returns (FilesDeleteResponse); // FileCheck checks file CIDs and children for exists rpc FilesCheck(FilesCheckRequest) returns (FilesCheckResponse); - // BlocksDelete deletes block from space - rpc BlocksDelete(BlocksDeleteRequest) returns (BlocksDeleteResponse); // Check checks the connection and credentials rpc Check(CheckRequest) returns (CheckResponse); // CheckUsage checks current usage and limits for a space @@ -44,8 +40,9 @@ message BlockGetResponse { message BlockPushRequest { string spaceId = 1; - bytes cid = 2; - bytes data = 3; + string fileId = 2; + bytes cid = 3; + bytes data = 4; } message BlockPushResponse {} @@ -80,29 +77,23 @@ enum AvailabilityStatus { message BlocksBindRequest { string spaceId = 1; - repeated bytes cids = 2; + string fileId = 2; + repeated bytes cids = 3; } message BlocksBindResponse {} -message FilesBindRequest { - string spaceId = 1; - repeated bytes fileCids = 2; -} - -message FilesBindResponse {} - message FilesDeleteRequest { string spaceId = 1; - repeated bytes fileCids = 2; + repeated bytes fileIds = 2; } message FilesDeleteResponse {} message FilesCheckRequest { string spaceId = 1; - repeated bytes fileCids = 2; + repeated bytes fileIds = 2; } message FilesCheckResponse {