39 lines
No EOL
1 KiB
Protocol Buffer
39 lines
No EOL
1 KiB
Protocol Buffer
edition = "2023";
|
|
|
|
package tstor.daemons.qbittorrent;
|
|
|
|
import "google/protobuf/go_features.proto";
|
|
option features.(pb.go).api_level = API_OPAQUE;
|
|
|
|
option go_package = "git.kmsign.ru/royalcat/tstor/plugins/qbittorrent/delivery/grpc/proto";
|
|
|
|
import "proto/filters/filters.proto";
|
|
|
|
message Torrent {
|
|
string name = 1;
|
|
string hash = 2;
|
|
repeated string source_files = 3;
|
|
}
|
|
|
|
service QBitTorrentService {
|
|
rpc GetTorrents(GetTorrentsRequest) returns (GetTorrentsResponse) {}
|
|
|
|
rpc Cleanup(CleanupRequest) returns (CleanupResponse) {}
|
|
rpc CleanupUnregistred(CleanupUnregistredRequest)
|
|
returns (CleanupUnregistredResponse) {}
|
|
}
|
|
|
|
message GetTorrentsRequest { tstor.filters.IntFilter sources_count = 1; }
|
|
message GetTorrentsResponse { repeated Torrent torrents = 1; }
|
|
|
|
message CleanupRequest { bool act = 1 [ default = false ]; }
|
|
message CleanupResponse {
|
|
int32 count = 1;
|
|
repeated string hashes = 2;
|
|
}
|
|
|
|
message CleanupUnregistredRequest { bool act = 1 [ default = false ]; }
|
|
message CleanupUnregistredResponse {
|
|
int32 count = 1;
|
|
repeated string hashes = 2;
|
|
} |