feat: add GetPieceNumbersRequest and GetPieceNumbersResponse (#202)

Signed-off-by: Gaius <gaius.qi@gmail.com>
This commit is contained in:
Gaius 2023-11-01 17:56:05 +08:00 committed by GitHub
parent 001ec211a4
commit 1cf73ec2fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 255 additions and 300 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "dragonfly-api"
version = "2.0.38"
version = "2.0.39"
authors = ["Gaius <gaius.qi@gmail.com>"]
edition = "2021"
license = "Apache-2.0"

View File

@ -38,15 +38,15 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// InterestedAllPiecesRequest represents interested all pieces request of SyncPiecesRequest.
type InterestedAllPiecesRequest struct {
// GetPieceNumbersRequest represents gets piece numbers request of SyncPiecesRequest.
type GetPieceNumbersRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *InterestedAllPiecesRequest) Reset() {
*x = InterestedAllPiecesRequest{}
func (x *GetPieceNumbersRequest) Reset() {
*x = GetPieceNumbersRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -54,13 +54,13 @@ func (x *InterestedAllPiecesRequest) Reset() {
}
}
func (x *InterestedAllPiecesRequest) String() string {
func (x *GetPieceNumbersRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InterestedAllPiecesRequest) ProtoMessage() {}
func (*GetPieceNumbersRequest) ProtoMessage() {}
func (x *InterestedAllPiecesRequest) ProtoReflect() protoreflect.Message {
func (x *GetPieceNumbersRequest) ProtoReflect() protoreflect.Message {
mi := &file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -72,8 +72,8 @@ func (x *InterestedAllPiecesRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use InterestedAllPiecesRequest.ProtoReflect.Descriptor instead.
func (*InterestedAllPiecesRequest) Descriptor() ([]byte, []int) {
// Deprecated: Use GetPieceNumbersRequest.ProtoReflect.Descriptor instead.
func (*GetPieceNumbersRequest) Descriptor() ([]byte, []int) {
return file_pkg_apis_dfdaemon_v2_dfdaemon_proto_rawDescGZIP(), []int{0}
}
@ -136,7 +136,7 @@ type SyncPiecesRequest struct {
TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
// Types that are assignable to Request:
//
// *SyncPiecesRequest_InterestedAllPiecesRequest
// *SyncPiecesRequest_GetPieceNumbersRequest
// *SyncPiecesRequest_InterestedPiecesRequest
Request isSyncPiecesRequest_Request `protobuf_oneof:"request"`
}
@ -187,9 +187,9 @@ func (m *SyncPiecesRequest) GetRequest() isSyncPiecesRequest_Request {
return nil
}
func (x *SyncPiecesRequest) GetInterestedAllPiecesRequest() *InterestedAllPiecesRequest {
if x, ok := x.GetRequest().(*SyncPiecesRequest_InterestedAllPiecesRequest); ok {
return x.InterestedAllPiecesRequest
func (x *SyncPiecesRequest) GetGetPieceNumbersRequest() *GetPieceNumbersRequest {
if x, ok := x.GetRequest().(*SyncPiecesRequest_GetPieceNumbersRequest); ok {
return x.GetPieceNumbersRequest
}
return nil
}
@ -205,30 +205,30 @@ type isSyncPiecesRequest_Request interface {
isSyncPiecesRequest_Request()
}
type SyncPiecesRequest_InterestedAllPiecesRequest struct {
InterestedAllPiecesRequest *InterestedAllPiecesRequest `protobuf:"bytes,2,opt,name=interested_all_pieces_request,json=interestedAllPiecesRequest,proto3,oneof"`
type SyncPiecesRequest_GetPieceNumbersRequest struct {
GetPieceNumbersRequest *GetPieceNumbersRequest `protobuf:"bytes,2,opt,name=get_piece_numbers_request,json=getPieceNumbersRequest,proto3,oneof"`
}
type SyncPiecesRequest_InterestedPiecesRequest struct {
InterestedPiecesRequest *InterestedPiecesRequest `protobuf:"bytes,3,opt,name=interested_pieces_request,json=interestedPiecesRequest,proto3,oneof"`
}
func (*SyncPiecesRequest_InterestedAllPiecesRequest) isSyncPiecesRequest_Request() {}
func (*SyncPiecesRequest_GetPieceNumbersRequest) isSyncPiecesRequest_Request() {}
func (*SyncPiecesRequest_InterestedPiecesRequest) isSyncPiecesRequest_Request() {}
// InterestedPiecesResponse represents all pieces response of SyncPiecesResponse.
type InterestedAllPiecesResponse struct {
// GetPieceNumbersResponse represents gets piece numbers response of SyncPiecesResponse.
type GetPieceNumbersResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// One of the pieces in task.
Piece *v2.Piece `protobuf:"bytes,1,opt,name=piece,proto3" json:"piece,omitempty"`
// Piece numbers.
PieceNumbers []int32 `protobuf:"varint,1,rep,packed,name=piece_numbers,json=pieceNumbers,proto3" json:"piece_numbers,omitempty"`
}
func (x *InterestedAllPiecesResponse) Reset() {
*x = InterestedAllPiecesResponse{}
func (x *GetPieceNumbersResponse) Reset() {
*x = GetPieceNumbersResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -236,13 +236,13 @@ func (x *InterestedAllPiecesResponse) Reset() {
}
}
func (x *InterestedAllPiecesResponse) String() string {
func (x *GetPieceNumbersResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InterestedAllPiecesResponse) ProtoMessage() {}
func (*GetPieceNumbersResponse) ProtoMessage() {}
func (x *InterestedAllPiecesResponse) ProtoReflect() protoreflect.Message {
func (x *GetPieceNumbersResponse) ProtoReflect() protoreflect.Message {
mi := &file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -254,14 +254,14 @@ func (x *InterestedAllPiecesResponse) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use InterestedAllPiecesResponse.ProtoReflect.Descriptor instead.
func (*InterestedAllPiecesResponse) Descriptor() ([]byte, []int) {
// Deprecated: Use GetPieceNumbersResponse.ProtoReflect.Descriptor instead.
func (*GetPieceNumbersResponse) Descriptor() ([]byte, []int) {
return file_pkg_apis_dfdaemon_v2_dfdaemon_proto_rawDescGZIP(), []int{3}
}
func (x *InterestedAllPiecesResponse) GetPiece() *v2.Piece {
func (x *GetPieceNumbersResponse) GetPieceNumbers() []int32 {
if x != nil {
return x.Piece
return x.PieceNumbers
}
return nil
}
@ -323,7 +323,7 @@ type SyncPiecesResponse struct {
// Types that are assignable to Response:
//
// *SyncPiecesResponse_InterestedAllPiecesResponse
// *SyncPiecesResponse_GetPieceNumbersResponse
// *SyncPiecesResponse_InterestedPiecesResponse
Response isSyncPiecesResponse_Response `protobuf_oneof:"response"`
}
@ -367,9 +367,9 @@ func (m *SyncPiecesResponse) GetResponse() isSyncPiecesResponse_Response {
return nil
}
func (x *SyncPiecesResponse) GetInterestedAllPiecesResponse() *InterestedAllPiecesResponse {
if x, ok := x.GetResponse().(*SyncPiecesResponse_InterestedAllPiecesResponse); ok {
return x.InterestedAllPiecesResponse
func (x *SyncPiecesResponse) GetGetPieceNumbersResponse() *GetPieceNumbersResponse {
if x, ok := x.GetResponse().(*SyncPiecesResponse_GetPieceNumbersResponse); ok {
return x.GetPieceNumbersResponse
}
return nil
}
@ -385,15 +385,15 @@ type isSyncPiecesResponse_Response interface {
isSyncPiecesResponse_Response()
}
type SyncPiecesResponse_InterestedAllPiecesResponse struct {
InterestedAllPiecesResponse *InterestedAllPiecesResponse `protobuf:"bytes,1,opt,name=interested_all_pieces_response,json=interestedAllPiecesResponse,proto3,oneof"`
type SyncPiecesResponse_GetPieceNumbersResponse struct {
GetPieceNumbersResponse *GetPieceNumbersResponse `protobuf:"bytes,2,opt,name=get_piece_numbers_response,json=getPieceNumbersResponse,proto3,oneof"`
}
type SyncPiecesResponse_InterestedPiecesResponse struct {
InterestedPiecesResponse *InterestedPiecesResponse `protobuf:"bytes,2,opt,name=interested_pieces_response,json=interestedPiecesResponse,proto3,oneof"`
InterestedPiecesResponse *InterestedPiecesResponse `protobuf:"bytes,3,opt,name=interested_pieces_response,json=interestedPiecesResponse,proto3,oneof"`
}
func (*SyncPiecesResponse_InterestedAllPiecesResponse) isSyncPiecesResponse_Response() {}
func (*SyncPiecesResponse_GetPieceNumbersResponse) isSyncPiecesResponse_Response() {}
func (*SyncPiecesResponse_InterestedPiecesResponse) isSyncPiecesResponse_Response() {}
@ -604,23 +604,22 @@ var file_pkg_apis_dfdaemon_v2_dfdaemon_proto_rawDesc = []byte{
0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64,
0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1c, 0x0a, 0x1a, 0x49, 0x6e, 0x74,
0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x41, 0x6c, 0x6c, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x48, 0x0a, 0x17, 0x49, 0x6e, 0x74, 0x65, 0x72,
0x65, 0x73, 0x74, 0x65, 0x64, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x2d, 0x0a, 0x0d, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62,
0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01,
0x02, 0x08, 0x01, 0x52, 0x0c, 0x70, 0x69, 0x65, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72,
0x73, 0x22, 0x97, 0x02, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10,
0x01, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x6c, 0x0a, 0x1d, 0x69, 0x6e, 0x74,
0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x70, 0x69, 0x65, 0x63,
0x65, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x27, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x49,
0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x41, 0x6c, 0x6c, 0x50, 0x69, 0x65, 0x63,
0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x1a, 0x69, 0x6e, 0x74,
0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x41, 0x6c, 0x6c, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73,
0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x18, 0x0a, 0x16, 0x47, 0x65, 0x74,
0x50, 0x69, 0x65, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x22, 0x48, 0x0a, 0x17, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65,
0x64, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d,
0x0a, 0x0d, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18,
0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52,
0x0c, 0x70, 0x69, 0x65, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x8b, 0x02,
0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x74,
0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x60, 0x0a, 0x19, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x69, 0x65,
0x63, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65,
0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x69, 0x65, 0x63, 0x65, 0x4e,
0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52,
0x16, 0x67, 0x65, 0x74, 0x50, 0x69, 0x65, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x62, 0x0a, 0x19, 0x69, 0x6e, 0x74, 0x65, 0x72,
0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x66, 0x64,
@ -628,76 +627,74 @@ var file_pkg_apis_dfdaemon_v2_dfdaemon_proto_rawDesc = []byte{
0x74, 0x65, 0x64, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x48, 0x00, 0x52, 0x17, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x50, 0x69,
0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x0e, 0x0a, 0x07, 0x72,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x4f, 0x0a, 0x1b, 0x49,
0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x41, 0x6c, 0x6c, 0x50, 0x69, 0x65, 0x63,
0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x70, 0x69,
0x65, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x69, 0x65, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05,
0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x70, 0x69, 0x65, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x18,
0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x70, 0x69, 0x65, 0x63,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
0x2e, 0x76, 0x32, 0x2e, 0x50, 0x69, 0x65, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01,
0x02, 0x10, 0x01, 0x52, 0x05, 0x70, 0x69, 0x65, 0x63, 0x65, 0x22, 0xfd, 0x01, 0x0a, 0x12, 0x53,
0x79, 0x6e, 0x63, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x6f, 0x0a, 0x1e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f,
0x61, 0x6c, 0x6c, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x64, 0x66, 0x64, 0x61,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x3e, 0x0a, 0x17, 0x47,
0x65, 0x74, 0x50, 0x69, 0x65, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f,
0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0c, 0x70,
0x69, 0x65, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x4c, 0x0a, 0x18, 0x49,
0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x70, 0x69, 0x65, 0x63, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
0x76, 0x32, 0x2e, 0x50, 0x69, 0x65, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02,
0x10, 0x01, 0x52, 0x05, 0x70, 0x69, 0x65, 0x63, 0x65, 0x22, 0xf1, 0x01, 0x0a, 0x12, 0x53, 0x79,
0x6e, 0x63, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x63, 0x0a, 0x1a, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x6e, 0x75,
0x6d, 0x62, 0x65, 0x72, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e,
0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x69, 0x65, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65,
0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x17, 0x67, 0x65,
0x74, 0x50, 0x69, 0x65, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x1a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73,
0x74, 0x65, 0x64, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x66, 0x64, 0x61,
0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74,
0x65, 0x64, 0x41, 0x6c, 0x6c, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x1b, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65,
0x64, 0x41, 0x6c, 0x6c, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x65, 0x0a, 0x1a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64,
0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f,
0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x50,
0x69, 0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52,
0x18, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x50, 0x69, 0x65, 0x63, 0x65,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0f, 0x0a, 0x08, 0x72, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x50, 0x0a, 0x13, 0x44, 0x6f,
0x65, 0x64, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x48, 0x00, 0x52, 0x18, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x65, 0x64, 0x50, 0x69,
0x65, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0f, 0x0a, 0x08,
0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x50, 0x0a,
0x13, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x08, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
0x76, 0x32, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05,
0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x22,
0x42, 0x0a, 0x11, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x54,
0x61, 0x73, 0x6b, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x74,
0x61, 0x73, 0x6b, 0x22, 0x33, 0x0a, 0x0f, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01,
0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x35, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65,
0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a,
0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07,
0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x32,
0xee, 0x02, 0x0a, 0x08, 0x44, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x0a,
0x53, 0x79, 0x6e, 0x63, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x64, 0x66, 0x64,
0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x69, 0x65,
0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x64, 0x66, 0x64,
0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x69, 0x65,
0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12,
0x48, 0x0a, 0x0c, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x12,
0x20, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x6f,
0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x39, 0x0a, 0x08, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e,
0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02,
0x10, 0x01, 0x52, 0x08, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x42, 0x0a, 0x11,
0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x2d, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b,
0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x74, 0x61, 0x73, 0x6b,
0x22, 0x33, 0x0a, 0x0f, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x74,
0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x35, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54,
0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x07, 0x74, 0x61,
0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04,
0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x32, 0xee, 0x02, 0x0a,
0x08, 0x44, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x0a, 0x53, 0x79, 0x6e,
0x63, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d,
0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d,
0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x69, 0x65, 0x63, 0x65, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x48, 0x0a, 0x0c,
0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x20, 0x2e, 0x64,
0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c,
0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x44, 0x0a, 0x0a, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64,
0x54, 0x61, 0x73, 0x6b, 0x12, 0x1e, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e,
0x76, 0x32, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x39, 0x0a, 0x08,
0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1c, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65,
0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x44, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74,
0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1e, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e,
0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x2d, 0x5a,
0x2b, 0x64, 0x37, 0x79, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x70,
0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e,
0x2f, 0x76, 0x32, 0x3b, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x44, 0x0a, 0x0a, 0x55, 0x70, 0x6c,
0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1e, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d,
0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12,
0x39, 0x0a, 0x08, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1c, 0x2e, 0x64, 0x66,
0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61,
0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x44, 0x0a, 0x0a, 0x44, 0x65,
0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1e, 0x2e, 0x64, 0x66, 0x64, 0x61, 0x65,
0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73,
0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
0x42, 0x2d, 0x5a, 0x2b, 0x64, 0x37, 0x79, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76,
0x32, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x64, 0x66, 0x64, 0x61, 0x65,
0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x32, 0x3b, 0x64, 0x66, 0x64, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -714,45 +711,44 @@ func file_pkg_apis_dfdaemon_v2_dfdaemon_proto_rawDescGZIP() []byte {
var file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
var file_pkg_apis_dfdaemon_v2_dfdaemon_proto_goTypes = []interface{}{
(*InterestedAllPiecesRequest)(nil), // 0: dfdaemon.v2.InterestedAllPiecesRequest
(*InterestedPiecesRequest)(nil), // 1: dfdaemon.v2.InterestedPiecesRequest
(*SyncPiecesRequest)(nil), // 2: dfdaemon.v2.SyncPiecesRequest
(*InterestedAllPiecesResponse)(nil), // 3: dfdaemon.v2.InterestedAllPiecesResponse
(*InterestedPiecesResponse)(nil), // 4: dfdaemon.v2.InterestedPiecesResponse
(*SyncPiecesResponse)(nil), // 5: dfdaemon.v2.SyncPiecesResponse
(*DownloadTaskRequest)(nil), // 6: dfdaemon.v2.DownloadTaskRequest
(*UploadTaskRequest)(nil), // 7: dfdaemon.v2.UploadTaskRequest
(*StatTaskRequest)(nil), // 8: dfdaemon.v2.StatTaskRequest
(*DeleteTaskRequest)(nil), // 9: dfdaemon.v2.DeleteTaskRequest
(*v2.Piece)(nil), // 10: common.v2.Piece
(*v2.Download)(nil), // 11: common.v2.Download
(*v2.Task)(nil), // 12: common.v2.Task
(*emptypb.Empty)(nil), // 13: google.protobuf.Empty
(*GetPieceNumbersRequest)(nil), // 0: dfdaemon.v2.GetPieceNumbersRequest
(*InterestedPiecesRequest)(nil), // 1: dfdaemon.v2.InterestedPiecesRequest
(*SyncPiecesRequest)(nil), // 2: dfdaemon.v2.SyncPiecesRequest
(*GetPieceNumbersResponse)(nil), // 3: dfdaemon.v2.GetPieceNumbersResponse
(*InterestedPiecesResponse)(nil), // 4: dfdaemon.v2.InterestedPiecesResponse
(*SyncPiecesResponse)(nil), // 5: dfdaemon.v2.SyncPiecesResponse
(*DownloadTaskRequest)(nil), // 6: dfdaemon.v2.DownloadTaskRequest
(*UploadTaskRequest)(nil), // 7: dfdaemon.v2.UploadTaskRequest
(*StatTaskRequest)(nil), // 8: dfdaemon.v2.StatTaskRequest
(*DeleteTaskRequest)(nil), // 9: dfdaemon.v2.DeleteTaskRequest
(*v2.Piece)(nil), // 10: common.v2.Piece
(*v2.Download)(nil), // 11: common.v2.Download
(*v2.Task)(nil), // 12: common.v2.Task
(*emptypb.Empty)(nil), // 13: google.protobuf.Empty
}
var file_pkg_apis_dfdaemon_v2_dfdaemon_proto_depIdxs = []int32{
0, // 0: dfdaemon.v2.SyncPiecesRequest.interested_all_pieces_request:type_name -> dfdaemon.v2.InterestedAllPiecesRequest
0, // 0: dfdaemon.v2.SyncPiecesRequest.get_piece_numbers_request:type_name -> dfdaemon.v2.GetPieceNumbersRequest
1, // 1: dfdaemon.v2.SyncPiecesRequest.interested_pieces_request:type_name -> dfdaemon.v2.InterestedPiecesRequest
10, // 2: dfdaemon.v2.InterestedAllPiecesResponse.piece:type_name -> common.v2.Piece
10, // 3: dfdaemon.v2.InterestedPiecesResponse.piece:type_name -> common.v2.Piece
3, // 4: dfdaemon.v2.SyncPiecesResponse.interested_all_pieces_response:type_name -> dfdaemon.v2.InterestedAllPiecesResponse
4, // 5: dfdaemon.v2.SyncPiecesResponse.interested_pieces_response:type_name -> dfdaemon.v2.InterestedPiecesResponse
11, // 6: dfdaemon.v2.DownloadTaskRequest.download:type_name -> common.v2.Download
12, // 7: dfdaemon.v2.UploadTaskRequest.task:type_name -> common.v2.Task
2, // 8: dfdaemon.v2.Dfdaemon.SyncPieces:input_type -> dfdaemon.v2.SyncPiecesRequest
6, // 9: dfdaemon.v2.Dfdaemon.DownloadTask:input_type -> dfdaemon.v2.DownloadTaskRequest
7, // 10: dfdaemon.v2.Dfdaemon.UploadTask:input_type -> dfdaemon.v2.UploadTaskRequest
8, // 11: dfdaemon.v2.Dfdaemon.StatTask:input_type -> dfdaemon.v2.StatTaskRequest
9, // 12: dfdaemon.v2.Dfdaemon.DeleteTask:input_type -> dfdaemon.v2.DeleteTaskRequest
5, // 13: dfdaemon.v2.Dfdaemon.SyncPieces:output_type -> dfdaemon.v2.SyncPiecesResponse
13, // 14: dfdaemon.v2.Dfdaemon.DownloadTask:output_type -> google.protobuf.Empty
13, // 15: dfdaemon.v2.Dfdaemon.UploadTask:output_type -> google.protobuf.Empty
12, // 16: dfdaemon.v2.Dfdaemon.StatTask:output_type -> common.v2.Task
13, // 17: dfdaemon.v2.Dfdaemon.DeleteTask:output_type -> google.protobuf.Empty
13, // [13:18] is the sub-list for method output_type
8, // [8:13] is the sub-list for method input_type
8, // [8:8] is the sub-list for extension type_name
8, // [8:8] is the sub-list for extension extendee
0, // [0:8] is the sub-list for field type_name
10, // 2: dfdaemon.v2.InterestedPiecesResponse.piece:type_name -> common.v2.Piece
3, // 3: dfdaemon.v2.SyncPiecesResponse.get_piece_numbers_response:type_name -> dfdaemon.v2.GetPieceNumbersResponse
4, // 4: dfdaemon.v2.SyncPiecesResponse.interested_pieces_response:type_name -> dfdaemon.v2.InterestedPiecesResponse
11, // 5: dfdaemon.v2.DownloadTaskRequest.download:type_name -> common.v2.Download
12, // 6: dfdaemon.v2.UploadTaskRequest.task:type_name -> common.v2.Task
2, // 7: dfdaemon.v2.Dfdaemon.SyncPieces:input_type -> dfdaemon.v2.SyncPiecesRequest
6, // 8: dfdaemon.v2.Dfdaemon.DownloadTask:input_type -> dfdaemon.v2.DownloadTaskRequest
7, // 9: dfdaemon.v2.Dfdaemon.UploadTask:input_type -> dfdaemon.v2.UploadTaskRequest
8, // 10: dfdaemon.v2.Dfdaemon.StatTask:input_type -> dfdaemon.v2.StatTaskRequest
9, // 11: dfdaemon.v2.Dfdaemon.DeleteTask:input_type -> dfdaemon.v2.DeleteTaskRequest
5, // 12: dfdaemon.v2.Dfdaemon.SyncPieces:output_type -> dfdaemon.v2.SyncPiecesResponse
13, // 13: dfdaemon.v2.Dfdaemon.DownloadTask:output_type -> google.protobuf.Empty
13, // 14: dfdaemon.v2.Dfdaemon.UploadTask:output_type -> google.protobuf.Empty
12, // 15: dfdaemon.v2.Dfdaemon.StatTask:output_type -> common.v2.Task
13, // 16: dfdaemon.v2.Dfdaemon.DeleteTask:output_type -> google.protobuf.Empty
12, // [12:17] is the sub-list for method output_type
7, // [7:12] is the sub-list for method input_type
7, // [7:7] is the sub-list for extension type_name
7, // [7:7] is the sub-list for extension extendee
0, // [0:7] is the sub-list for field type_name
}
func init() { file_pkg_apis_dfdaemon_v2_dfdaemon_proto_init() }
@ -762,7 +758,7 @@ func file_pkg_apis_dfdaemon_v2_dfdaemon_proto_init() {
}
if !protoimpl.UnsafeEnabled {
file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InterestedAllPiecesRequest); i {
switch v := v.(*GetPieceNumbersRequest); i {
case 0:
return &v.state
case 1:
@ -798,7 +794,7 @@ func file_pkg_apis_dfdaemon_v2_dfdaemon_proto_init() {
}
}
file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InterestedAllPiecesResponse); i {
switch v := v.(*GetPieceNumbersResponse); i {
case 0:
return &v.state
case 1:
@ -883,11 +879,11 @@ func file_pkg_apis_dfdaemon_v2_dfdaemon_proto_init() {
}
}
file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes[2].OneofWrappers = []interface{}{
(*SyncPiecesRequest_InterestedAllPiecesRequest)(nil),
(*SyncPiecesRequest_GetPieceNumbersRequest)(nil),
(*SyncPiecesRequest_InterestedPiecesRequest)(nil),
}
file_pkg_apis_dfdaemon_v2_dfdaemon_proto_msgTypes[5].OneofWrappers = []interface{}{
(*SyncPiecesResponse_InterestedAllPiecesResponse)(nil),
(*SyncPiecesResponse_GetPieceNumbersResponse)(nil),
(*SyncPiecesResponse_InterestedPiecesResponse)(nil),
}
type x struct{}

View File

@ -35,22 +35,22 @@ var (
_ = sort.Sort
)
// Validate checks the field values on InterestedAllPiecesRequest with the
// rules defined in the proto definition for this message. If any rules are
// Validate checks the field values on GetPieceNumbersRequest with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *InterestedAllPiecesRequest) Validate() error {
func (m *GetPieceNumbersRequest) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on InterestedAllPiecesRequest with the
// rules defined in the proto definition for this message. If any rules are
// ValidateAll checks the field values on GetPieceNumbersRequest with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// InterestedAllPiecesRequestMultiError, or nil if none found.
func (m *InterestedAllPiecesRequest) ValidateAll() error {
// GetPieceNumbersRequestMultiError, or nil if none found.
func (m *GetPieceNumbersRequest) ValidateAll() error {
return m.validate(true)
}
func (m *InterestedAllPiecesRequest) validate(all bool) error {
func (m *GetPieceNumbersRequest) validate(all bool) error {
if m == nil {
return nil
}
@ -58,19 +58,19 @@ func (m *InterestedAllPiecesRequest) validate(all bool) error {
var errors []error
if len(errors) > 0 {
return InterestedAllPiecesRequestMultiError(errors)
return GetPieceNumbersRequestMultiError(errors)
}
return nil
}
// InterestedAllPiecesRequestMultiError is an error wrapping multiple
// validation errors returned by InterestedAllPiecesRequest.ValidateAll() if
// the designated constraints aren't met.
type InterestedAllPiecesRequestMultiError []error
// GetPieceNumbersRequestMultiError is an error wrapping multiple validation
// errors returned by GetPieceNumbersRequest.ValidateAll() if the designated
// constraints aren't met.
type GetPieceNumbersRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m InterestedAllPiecesRequestMultiError) Error() string {
func (m GetPieceNumbersRequestMultiError) Error() string {
var msgs []string
for _, err := range m {
msgs = append(msgs, err.Error())
@ -79,11 +79,11 @@ func (m InterestedAllPiecesRequestMultiError) Error() string {
}
// AllErrors returns a list of validation violation errors.
func (m InterestedAllPiecesRequestMultiError) AllErrors() []error { return m }
func (m GetPieceNumbersRequestMultiError) AllErrors() []error { return m }
// InterestedAllPiecesRequestValidationError is the validation error returned
// by InterestedAllPiecesRequest.Validate if the designated constraints aren't met.
type InterestedAllPiecesRequestValidationError struct {
// GetPieceNumbersRequestValidationError is the validation error returned by
// GetPieceNumbersRequest.Validate if the designated constraints aren't met.
type GetPieceNumbersRequestValidationError struct {
field string
reason string
cause error
@ -91,24 +91,24 @@ type InterestedAllPiecesRequestValidationError struct {
}
// Field function returns field value.
func (e InterestedAllPiecesRequestValidationError) Field() string { return e.field }
func (e GetPieceNumbersRequestValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e InterestedAllPiecesRequestValidationError) Reason() string { return e.reason }
func (e GetPieceNumbersRequestValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e InterestedAllPiecesRequestValidationError) Cause() error { return e.cause }
func (e GetPieceNumbersRequestValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e InterestedAllPiecesRequestValidationError) Key() bool { return e.key }
func (e GetPieceNumbersRequestValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e InterestedAllPiecesRequestValidationError) ErrorName() string {
return "InterestedAllPiecesRequestValidationError"
func (e GetPieceNumbersRequestValidationError) ErrorName() string {
return "GetPieceNumbersRequestValidationError"
}
// Error satisfies the builtin error interface
func (e InterestedAllPiecesRequestValidationError) Error() string {
func (e GetPieceNumbersRequestValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
@ -120,14 +120,14 @@ func (e InterestedAllPiecesRequestValidationError) Error() string {
}
return fmt.Sprintf(
"invalid %sInterestedAllPiecesRequest.%s: %s%s",
"invalid %sGetPieceNumbersRequest.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = InterestedAllPiecesRequestValidationError{}
var _ error = GetPieceNumbersRequestValidationError{}
var _ interface {
Field() string
@ -135,7 +135,7 @@ var _ interface {
Key() bool
Cause() error
ErrorName() string
} = InterestedAllPiecesRequestValidationError{}
} = GetPieceNumbersRequestValidationError{}
// Validate checks the field values on InterestedPiecesRequest with the rules
// defined in the proto definition for this message. If any rules are
@ -285,7 +285,7 @@ func (m *SyncPiecesRequest) validate(all bool) error {
oneofRequestPresent := false
switch v := m.Request.(type) {
case *SyncPiecesRequest_InterestedAllPiecesRequest:
case *SyncPiecesRequest_GetPieceNumbersRequest:
if v == nil {
err := SyncPiecesRequestValidationError{
field: "Request",
@ -299,11 +299,11 @@ func (m *SyncPiecesRequest) validate(all bool) error {
oneofRequestPresent = true
if all {
switch v := interface{}(m.GetInterestedAllPiecesRequest()).(type) {
switch v := interface{}(m.GetGetPieceNumbersRequest()).(type) {
case interface{ ValidateAll() error }:
if err := v.ValidateAll(); err != nil {
errors = append(errors, SyncPiecesRequestValidationError{
field: "InterestedAllPiecesRequest",
field: "GetPieceNumbersRequest",
reason: "embedded message failed validation",
cause: err,
})
@ -311,16 +311,16 @@ func (m *SyncPiecesRequest) validate(all bool) error {
case interface{ Validate() error }:
if err := v.Validate(); err != nil {
errors = append(errors, SyncPiecesRequestValidationError{
field: "InterestedAllPiecesRequest",
field: "GetPieceNumbersRequest",
reason: "embedded message failed validation",
cause: err,
})
}
}
} else if v, ok := interface{}(m.GetInterestedAllPiecesRequest()).(interface{ Validate() error }); ok {
} else if v, ok := interface{}(m.GetGetPieceNumbersRequest()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return SyncPiecesRequestValidationError{
field: "InterestedAllPiecesRequest",
field: "GetPieceNumbersRequest",
reason: "embedded message failed validation",
cause: err,
}
@ -463,82 +463,42 @@ var _ interface {
ErrorName() string
} = SyncPiecesRequestValidationError{}
// Validate checks the field values on InterestedAllPiecesResponse with the
// rules defined in the proto definition for this message. If any rules are
// Validate checks the field values on GetPieceNumbersResponse with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *InterestedAllPiecesResponse) Validate() error {
func (m *GetPieceNumbersResponse) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on InterestedAllPiecesResponse with the
// ValidateAll checks the field values on GetPieceNumbersResponse with the
// rules defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// InterestedAllPiecesResponseMultiError, or nil if none found.
func (m *InterestedAllPiecesResponse) ValidateAll() error {
// GetPieceNumbersResponseMultiError, or nil if none found.
func (m *GetPieceNumbersResponse) ValidateAll() error {
return m.validate(true)
}
func (m *InterestedAllPiecesResponse) validate(all bool) error {
func (m *GetPieceNumbersResponse) validate(all bool) error {
if m == nil {
return nil
}
var errors []error
if m.GetPiece() == nil {
err := InterestedAllPiecesResponseValidationError{
field: "Piece",
reason: "value is required",
}
if !all {
return err
}
errors = append(errors, err)
}
if all {
switch v := interface{}(m.GetPiece()).(type) {
case interface{ ValidateAll() error }:
if err := v.ValidateAll(); err != nil {
errors = append(errors, InterestedAllPiecesResponseValidationError{
field: "Piece",
reason: "embedded message failed validation",
cause: err,
})
}
case interface{ Validate() error }:
if err := v.Validate(); err != nil {
errors = append(errors, InterestedAllPiecesResponseValidationError{
field: "Piece",
reason: "embedded message failed validation",
cause: err,
})
}
}
} else if v, ok := interface{}(m.GetPiece()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return InterestedAllPiecesResponseValidationError{
field: "Piece",
reason: "embedded message failed validation",
cause: err,
}
}
}
if len(errors) > 0 {
return InterestedAllPiecesResponseMultiError(errors)
return GetPieceNumbersResponseMultiError(errors)
}
return nil
}
// InterestedAllPiecesResponseMultiError is an error wrapping multiple
// validation errors returned by InterestedAllPiecesResponse.ValidateAll() if
// the designated constraints aren't met.
type InterestedAllPiecesResponseMultiError []error
// GetPieceNumbersResponseMultiError is an error wrapping multiple validation
// errors returned by GetPieceNumbersResponse.ValidateAll() if the designated
// constraints aren't met.
type GetPieceNumbersResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m InterestedAllPiecesResponseMultiError) Error() string {
func (m GetPieceNumbersResponseMultiError) Error() string {
var msgs []string
for _, err := range m {
msgs = append(msgs, err.Error())
@ -547,12 +507,11 @@ func (m InterestedAllPiecesResponseMultiError) Error() string {
}
// AllErrors returns a list of validation violation errors.
func (m InterestedAllPiecesResponseMultiError) AllErrors() []error { return m }
func (m GetPieceNumbersResponseMultiError) AllErrors() []error { return m }
// InterestedAllPiecesResponseValidationError is the validation error returned
// by InterestedAllPiecesResponse.Validate if the designated constraints
// aren't met.
type InterestedAllPiecesResponseValidationError struct {
// GetPieceNumbersResponseValidationError is the validation error returned by
// GetPieceNumbersResponse.Validate if the designated constraints aren't met.
type GetPieceNumbersResponseValidationError struct {
field string
reason string
cause error
@ -560,24 +519,24 @@ type InterestedAllPiecesResponseValidationError struct {
}
// Field function returns field value.
func (e InterestedAllPiecesResponseValidationError) Field() string { return e.field }
func (e GetPieceNumbersResponseValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e InterestedAllPiecesResponseValidationError) Reason() string { return e.reason }
func (e GetPieceNumbersResponseValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e InterestedAllPiecesResponseValidationError) Cause() error { return e.cause }
func (e GetPieceNumbersResponseValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e InterestedAllPiecesResponseValidationError) Key() bool { return e.key }
func (e GetPieceNumbersResponseValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e InterestedAllPiecesResponseValidationError) ErrorName() string {
return "InterestedAllPiecesResponseValidationError"
func (e GetPieceNumbersResponseValidationError) ErrorName() string {
return "GetPieceNumbersResponseValidationError"
}
// Error satisfies the builtin error interface
func (e InterestedAllPiecesResponseValidationError) Error() string {
func (e GetPieceNumbersResponseValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
@ -589,14 +548,14 @@ func (e InterestedAllPiecesResponseValidationError) Error() string {
}
return fmt.Sprintf(
"invalid %sInterestedAllPiecesResponse.%s: %s%s",
"invalid %sGetPieceNumbersResponse.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = InterestedAllPiecesResponseValidationError{}
var _ error = GetPieceNumbersResponseValidationError{}
var _ interface {
Field() string
@ -604,7 +563,7 @@ var _ interface {
Key() bool
Cause() error
ErrorName() string
} = InterestedAllPiecesResponseValidationError{}
} = GetPieceNumbersResponseValidationError{}
// Validate checks the field values on InterestedPiecesResponse with the rules
// defined in the proto definition for this message. If any rules are
@ -772,7 +731,7 @@ func (m *SyncPiecesResponse) validate(all bool) error {
oneofResponsePresent := false
switch v := m.Response.(type) {
case *SyncPiecesResponse_InterestedAllPiecesResponse:
case *SyncPiecesResponse_GetPieceNumbersResponse:
if v == nil {
err := SyncPiecesResponseValidationError{
field: "Response",
@ -786,11 +745,11 @@ func (m *SyncPiecesResponse) validate(all bool) error {
oneofResponsePresent = true
if all {
switch v := interface{}(m.GetInterestedAllPiecesResponse()).(type) {
switch v := interface{}(m.GetGetPieceNumbersResponse()).(type) {
case interface{ ValidateAll() error }:
if err := v.ValidateAll(); err != nil {
errors = append(errors, SyncPiecesResponseValidationError{
field: "InterestedAllPiecesResponse",
field: "GetPieceNumbersResponse",
reason: "embedded message failed validation",
cause: err,
})
@ -798,16 +757,16 @@ func (m *SyncPiecesResponse) validate(all bool) error {
case interface{ Validate() error }:
if err := v.Validate(); err != nil {
errors = append(errors, SyncPiecesResponseValidationError{
field: "InterestedAllPiecesResponse",
field: "GetPieceNumbersResponse",
reason: "embedded message failed validation",
cause: err,
})
}
}
} else if v, ok := interface{}(m.GetInterestedAllPiecesResponse()).(interface{ Validate() error }); ok {
} else if v, ok := interface{}(m.GetGetPieceNumbersResponse()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return SyncPiecesResponseValidationError{
field: "InterestedAllPiecesResponse",
field: "GetPieceNumbersResponse",
reason: "embedded message failed validation",
cause: err,
}

View File

@ -24,8 +24,8 @@ import "validate/validate.proto";
option go_package = "d7y.io/api/v2/pkg/apis/dfdaemon/v2;dfdaemon";
// InterestedAllPiecesRequest represents interested all pieces request of SyncPiecesRequest.
message InterestedAllPiecesRequest {
// GetPieceNumbersRequest represents gets piece numbers request of SyncPiecesRequest.
message GetPieceNumbersRequest {
}
// InterestedPiecesRequest represents interested pieces request of SyncPiecesRequest.
@ -42,15 +42,15 @@ message SyncPiecesRequest{
oneof request {
option (validate.required) = true;
InterestedAllPiecesRequest interested_all_pieces_request = 2;
GetPieceNumbersRequest get_piece_numbers_request = 2;
InterestedPiecesRequest interested_pieces_request = 3;
}
}
// InterestedPiecesResponse represents all pieces response of SyncPiecesResponse.
message InterestedAllPiecesResponse {
// One of the pieces in task.
common.v2.Piece piece = 1 [(validate.rules).message.required = true];
// GetPieceNumbersResponse represents gets piece numbers response of SyncPiecesResponse.
message GetPieceNumbersResponse {
// Piece numbers.
repeated int32 piece_numbers = 1;
}
// InterestedPiecesResponse represents interested pieces response of SyncPiecesResponse.
@ -64,8 +64,8 @@ message SyncPiecesResponse {
oneof response {
option (validate.required) = true;
InterestedAllPiecesResponse interested_all_pieces_response = 1;
InterestedPiecesResponse interested_pieces_response = 2;
GetPieceNumbersResponse get_piece_numbers_response = 2;
InterestedPiecesResponse interested_pieces_response = 3;
}
}

View File

@ -21,8 +21,8 @@ package dfdaemon.v2;
import "common.proto";
import "google/protobuf/empty.proto";
// InterestedAllPiecesRequest represents interested all pieces request of SyncPiecesRequest.
message InterestedAllPiecesRequest {
// GetPieceNumbersRequest represents gets piece numbers request of SyncPiecesRequest.
message GetPieceNumbersRequest {
}
// InterestedPiecesRequest represents interested pieces request of SyncPiecesRequest.
@ -37,15 +37,15 @@ message SyncPiecesRequest{
string task_id = 1;
oneof request {
InterestedAllPiecesRequest interested_all_pieces_request = 2;
GetPieceNumbersRequest get_piece_numbers_request = 2;
InterestedPiecesRequest interested_pieces_request = 3;
}
}
// InterestedPiecesResponse represents all pieces response of SyncPiecesResponse.
message InterestedAllPiecesResponse {
// One of the pieces in task.
common.v2.Piece piece = 1;
// GetPieceNumbersResponse represents gets piece numbers response of SyncPiecesResponse.
message GetPieceNumbersResponse {
// Piece numbers.
repeated int32 piece_numbers = 1;
}
// InterestedPiecesResponse represents interested pieces response of SyncPiecesResponse.
@ -57,8 +57,8 @@ message InterestedPiecesResponse {
// SyncPiecesResponse represents response of SyncPieces.
message SyncPiecesResponse {
oneof response {
InterestedAllPiecesResponse interested_all_pieces_response = 1;
InterestedPiecesResponse interested_pieces_response = 2;
GetPieceNumbersResponse get_piece_numbers_response = 2;
InterestedPiecesResponse interested_pieces_response = 3;
}
}

Binary file not shown.

View File

@ -1,8 +1,8 @@
/// InterestedAllPiecesRequest represents interested all pieces request of SyncPiecesRequest.
/// GetPieceNumbersRequest represents gets piece numbers request of SyncPiecesRequest.
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InterestedAllPiecesRequest {}
pub struct GetPieceNumbersRequest {}
/// InterestedPiecesRequest represents interested pieces request of SyncPiecesRequest.
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
@ -30,19 +30,19 @@ pub mod sync_pieces_request {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Request {
#[prost(message, tag = "2")]
InterestedAllPiecesRequest(super::InterestedAllPiecesRequest),
GetPieceNumbersRequest(super::GetPieceNumbersRequest),
#[prost(message, tag = "3")]
InterestedPiecesRequest(super::InterestedPiecesRequest),
}
}
/// InterestedPiecesResponse represents all pieces response of SyncPiecesResponse.
/// GetPieceNumbersResponse represents gets piece numbers response of SyncPiecesResponse.
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InterestedAllPiecesResponse {
/// One of the pieces in task.
#[prost(message, optional, tag = "1")]
pub piece: ::core::option::Option<super::super::common::v2::Piece>,
pub struct GetPieceNumbersResponse {
/// Piece numbers.
#[prost(int32, repeated, tag = "1")]
pub piece_numbers: ::prost::alloc::vec::Vec<i32>,
}
/// InterestedPiecesResponse represents interested pieces response of SyncPiecesResponse.
#[derive(serde::Serialize, serde::Deserialize)]
@ -58,7 +58,7 @@ pub struct InterestedPiecesResponse {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SyncPiecesResponse {
#[prost(oneof = "sync_pieces_response::Response", tags = "1, 2")]
#[prost(oneof = "sync_pieces_response::Response", tags = "2, 3")]
pub response: ::core::option::Option<sync_pieces_response::Response>,
}
/// Nested message and enum types in `SyncPiecesResponse`.
@ -67,9 +67,9 @@ pub mod sync_pieces_response {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "1")]
InterestedAllPiecesResponse(super::InterestedAllPiecesResponse),
#[prost(message, tag = "2")]
GetPieceNumbersResponse(super::GetPieceNumbersResponse),
#[prost(message, tag = "3")]
InterestedPiecesResponse(super::InterestedPiecesResponse),
}
}