Start from scratch
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
syntax = "proto3";
|
||||
package hello;
|
||||
|
||||
service Greeter {
|
||||
// Our SayHello rpc accepts HelloRequests and returns HelloReplies
|
||||
rpc SayHello (HelloRequest) returns (HelloReply);
|
||||
}
|
||||
message HelloRequest {
|
||||
// Request message contains the name to be greeted
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
message HelloReply {
|
||||
// Reply contains the greeting message
|
||||
string message = 1;
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package music_agregator.hello.v1;
|
||||
option go_package = "homelab.lan/music-agregator/gen/music_agregator/v1/hello";
|
||||
|
||||
service HelloService {
|
||||
rpc Ping(PingRequest) returns (PongResponse) {}
|
||||
rpc Echo(EchoRequest) returns (EchoResponse) {}
|
||||
}
|
||||
|
||||
message PingRequest {
|
||||
|
||||
}
|
||||
message PongResponse {
|
||||
}
|
||||
|
||||
message EchoRequest {
|
||||
string msg = 1;
|
||||
}
|
||||
|
||||
message EchoResponse {
|
||||
string response = 1;
|
||||
}
|
||||
@@ -1,109 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package music_agregator.indexer.v1;
|
||||
option go_package = "homelab.lan/music-agregator/gen/music_agregator/v1/indexer";
|
||||
|
||||
service IndexerService {
|
||||
rpc Search(SearchRequest) returns (SearchResponse) {}
|
||||
rpc Capabilities(CapabilitiesRequest) returns (CapabilitiesResponse) {}
|
||||
}
|
||||
|
||||
message SearchRequest {
|
||||
string query = 1;
|
||||
int32 limit = 2;
|
||||
string tracker = 3;
|
||||
}
|
||||
message SearchResponse {
|
||||
repeated SearchItem result = 1;
|
||||
}
|
||||
|
||||
message SearchItem {
|
||||
string title = 1;
|
||||
string download_link = 2;
|
||||
string torrent_page_url = 3;
|
||||
string pub_date = 4;
|
||||
int64 size = 5;
|
||||
string description = 6;
|
||||
repeated string categories = 7;
|
||||
Enclosure enclosure = 8;
|
||||
repeated TorznabAttr torznab_attrs = 9;
|
||||
Release release = 10;
|
||||
}
|
||||
|
||||
message Release {
|
||||
string raw_title = 1;
|
||||
string artist = 2;
|
||||
string album = 3;
|
||||
int32 year = 4;
|
||||
int32 year_end = 5;
|
||||
string type = 6;
|
||||
repeated string genres = 7;
|
||||
string format = 8;
|
||||
string source = 9;
|
||||
string bitrate = 10;
|
||||
int32 bit_depth = 11;
|
||||
int32 sample_rate = 12;
|
||||
string rip_type = 13;
|
||||
int32 release_count = 14;
|
||||
repeated string tags = 15;
|
||||
string label = 16;
|
||||
string catalog_num = 17;
|
||||
bool parsed_successfully = 18;
|
||||
repeated string parse_errors = 19;
|
||||
}
|
||||
|
||||
message Enclosure {
|
||||
string url = 1;
|
||||
int64 length = 2;
|
||||
string type = 3;
|
||||
}
|
||||
|
||||
message TorznabAttr {
|
||||
string name = 1;
|
||||
string value = 2;
|
||||
}
|
||||
|
||||
message CapabilitiesRequest {
|
||||
string indexer = 1;
|
||||
}
|
||||
|
||||
message CapabilitiesResponse {
|
||||
Server server = 1;
|
||||
Limits limits = 2;
|
||||
Searching searching = 3;
|
||||
repeated Category categories = 4;
|
||||
}
|
||||
|
||||
message Server {
|
||||
string title = 1;
|
||||
}
|
||||
|
||||
message Limits {
|
||||
int32 default = 1;
|
||||
int32 max = 2;
|
||||
}
|
||||
|
||||
message Searching {
|
||||
SearchCapability search = 1;
|
||||
SearchCapability tv_search = 2;
|
||||
SearchCapability movie_search = 3;
|
||||
SearchCapability music_search = 4;
|
||||
SearchCapability audio_search = 5;
|
||||
SearchCapability book_search = 6;
|
||||
}
|
||||
|
||||
message SearchCapability {
|
||||
bool available = 1;
|
||||
repeated string supported_params = 2;
|
||||
string search_engine = 3;
|
||||
}
|
||||
|
||||
message Category {
|
||||
int32 id = 1;
|
||||
string name = 2;
|
||||
repeated Subcat subcats = 3;
|
||||
}
|
||||
|
||||
message Subcat {
|
||||
int32 id = 1;
|
||||
string name = 2;
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package music_agregator.torrent.v1;
|
||||
option go_package = "homelab.lan/music-agregator/gen/music_agregator/v1/torrent";
|
||||
|
||||
service TorrentService {
|
||||
rpc List(ListRequest) returns (ListResponse) {}
|
||||
rpc Add(AddRequest) returns (AddResponse) {}
|
||||
}
|
||||
|
||||
message ListRequest {
|
||||
string client_name = 1;
|
||||
string filter = 2;
|
||||
string category = 3;
|
||||
string tag = 4;
|
||||
string sort = 5;
|
||||
bool reverse = 6;
|
||||
int32 limit = 7;
|
||||
int32 offset = 8;
|
||||
}
|
||||
|
||||
message ListResponse {
|
||||
repeated ListItem items = 1;
|
||||
}
|
||||
|
||||
message ListItem {
|
||||
string hash = 1;
|
||||
string name = 2;
|
||||
int64 size = 3;
|
||||
double progress = 4;
|
||||
int64 dlspeed = 5;
|
||||
int64 upspeed = 6;
|
||||
int32 num_seeds = 7;
|
||||
int32 num_leechs = 8;
|
||||
string state = 9;
|
||||
int64 eta = 10;
|
||||
double ratio = 11;
|
||||
string category = 12;
|
||||
string tags = 13;
|
||||
int64 added_on = 14;
|
||||
int64 completion_on = 15;
|
||||
string save_path = 16;
|
||||
string content_path = 17;
|
||||
int64 downloaded = 18;
|
||||
int64 uploaded = 19;
|
||||
string tracker = 20;
|
||||
int64 seeding_time = 21;
|
||||
int64 amount_left = 22;
|
||||
double availability = 23;
|
||||
|
||||
string size_formatted = 100;
|
||||
string progress_formatted = 101;
|
||||
string dlspeed_formatted = 102;
|
||||
string upspeed_formatted = 103;
|
||||
string added_on_formatted = 104;
|
||||
string completion_on_formatted = 105;
|
||||
string downloaded_formatted = 106;
|
||||
string uploaded_formatted = 107;
|
||||
string amount_left_formatted = 108;
|
||||
string availability_formatted = 109;
|
||||
string eta_formatted = 110;
|
||||
}
|
||||
|
||||
message AddRequest {
|
||||
string download_url = 1;
|
||||
string filename = 2;
|
||||
bytes torrent_data = 3;
|
||||
string save_path = 4;
|
||||
}
|
||||
|
||||
message AddResponse {
|
||||
ListItem item = 1;
|
||||
}
|
||||
@@ -1,410 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package music_agregator.v1;
|
||||
option go_package = "homelab.lan/music-agregator/gen/music_agregator/v1/";
|
||||
|
||||
service MusicAgregatorService {
|
||||
rpc MonitorAlbum(MonitorAlbumRequest) returns (MonitorAlbumResponse) {
|
||||
option deprecated = true;
|
||||
}
|
||||
rpc MonitorAlbumStream(stream MonitorAlbumStreamRequest) returns (stream MonitorAlbumStreamResponse) {}
|
||||
rpc GetArtists(GetArtistsRequest) returns (GetArtistsResponse) {}
|
||||
rpc GetAlbum(GetAlbumRequest) returns (GetAlbumResponse) {}
|
||||
rpc AnalyzeAlbumRelease(AnalyzeAlbumReleaseRequest) returns (AnalyzeAlbumReleaseResponse) {}
|
||||
rpc SearchArtists(SearchArtistsRequest) returns (SearchArtistsResponse) {}
|
||||
rpc GetArtistAlbums(GetArtistAlbumsRequest) returns (GetArtistAlbumsResponse) {}
|
||||
rpc SubscribeEvents(SubscribeEventsRequest) returns (stream AlbumEvent) {}
|
||||
rpc ResyncAlbum(ResyncAlbumRequest) returns (ResyncAlbumResponse) {}
|
||||
}
|
||||
|
||||
message ResyncAlbumRequest {
|
||||
string album_id = 1;
|
||||
}
|
||||
|
||||
message ResyncAlbumResponse {
|
||||
int32 files_synced = 1;
|
||||
int32 files_enriched = 2;
|
||||
uint64 bytes_synced = 3;
|
||||
}
|
||||
|
||||
message MonitorAlbumRequest {
|
||||
string album_id = 1;
|
||||
IndexerOptions indexer_options = 2;
|
||||
QualityType quality = 3;
|
||||
}
|
||||
|
||||
message IndexerOptions {
|
||||
string tracker = 1;
|
||||
}
|
||||
|
||||
enum QualityType {
|
||||
QUALITY_UNSPECIFIED = 0;
|
||||
QUALITY_LOSSLESS = 1;
|
||||
QUALITY_LOSSY = 2;
|
||||
}
|
||||
|
||||
message MonitorAlbumResponse {
|
||||
AlbumDetail album = 1;
|
||||
ArtistSummary artist = 2;
|
||||
MonitoredRelease release = 3;
|
||||
}
|
||||
|
||||
message GetArtistsRequest {}
|
||||
|
||||
message GetArtistsResponse {
|
||||
repeated ArtistSummary artists = 1;
|
||||
}
|
||||
|
||||
enum MonitorState {
|
||||
MONITOR_STATE_UNSPECIFIED = 0;
|
||||
MONITOR_STATE_MONITORED = 1;
|
||||
MONITOR_STATE_UNMONITORED = 2;
|
||||
MONITOR_STATE_EXCLUDED = 3;
|
||||
}
|
||||
|
||||
message ArtistSummary {
|
||||
string id = 1;
|
||||
string external_id = 2;
|
||||
string name = 3;
|
||||
string artist_type = 4;
|
||||
string country = 5;
|
||||
repeated string genres = 6;
|
||||
string image_url = 7;
|
||||
MonitorState monitor_state = 8;
|
||||
repeated AlbumDetail albums = 9;
|
||||
}
|
||||
|
||||
message AlbumDetail {
|
||||
string id = 1;
|
||||
string external_id = 2;
|
||||
string title = 3;
|
||||
string album_type = 4;
|
||||
string release_date = 5;
|
||||
int32 total_tracks = 6;
|
||||
int32 total_discs = 7;
|
||||
string cover_url = 8;
|
||||
repeated string genres = 9;
|
||||
string label = 10;
|
||||
MonitorState monitor_state = 11;
|
||||
repeated DownloadInfo downloads = 12;
|
||||
AlbumReleaseDetail release = 13;
|
||||
}
|
||||
|
||||
message DownloadInfo {
|
||||
string state = 1;
|
||||
string format = 2;
|
||||
string quality = 3;
|
||||
string save_path = 4;
|
||||
}
|
||||
|
||||
message GetAlbumRequest {
|
||||
string album_id = 1;
|
||||
}
|
||||
|
||||
message AlbumInfo {
|
||||
AlbumDetail album = 1;
|
||||
repeated TrackDetail tracks = 2;
|
||||
}
|
||||
|
||||
message GetAlbumResponse {
|
||||
AlbumInfo info = 1;
|
||||
}
|
||||
|
||||
message AnalyzeAlbumReleaseRequest {
|
||||
string album_id = 1;
|
||||
}
|
||||
|
||||
message AnalyzeAlbumReleaseResponse {
|
||||
AlbumInfo info = 1;
|
||||
}
|
||||
|
||||
message TrackDetail {
|
||||
string id = 1;
|
||||
string external_id = 2;
|
||||
string title = 3;
|
||||
int32 duration_ms = 4;
|
||||
int32 disc_number = 5;
|
||||
int32 track_number = 6;
|
||||
string isrc = 7;
|
||||
bool explicit = 8;
|
||||
repeated ArtistCredit artists = 9;
|
||||
string file_path = 10;
|
||||
int64 file_size = 11;
|
||||
string format = 12;
|
||||
int32 bit_depth = 13;
|
||||
int32 sample_rate = 14;
|
||||
int32 channels = 15;
|
||||
int32 bitrate_kbps = 16;
|
||||
}
|
||||
|
||||
message ArtistCredit {
|
||||
string id = 1;
|
||||
string name = 2;
|
||||
}
|
||||
|
||||
message AlbumReleaseDetail {
|
||||
string id = 1;
|
||||
string format = 2;
|
||||
int32 bit_depth = 3;
|
||||
int32 sample_rate = 4;
|
||||
int32 channels = 5;
|
||||
bool is_lossless = 6;
|
||||
string source = 7;
|
||||
int64 total_size = 8;
|
||||
int32 total_duration_ms = 9;
|
||||
int32 track_count = 10;
|
||||
bool has_cover_art = 11;
|
||||
bool has_cue_sheet = 12;
|
||||
bool has_rip_log = 13;
|
||||
string path = 14;
|
||||
}
|
||||
|
||||
message MonitoredRelease {
|
||||
string info_hash = 1;
|
||||
string artist = 2;
|
||||
string album = 3;
|
||||
int32 year = 4;
|
||||
string format = 5;
|
||||
bool lossless = 6;
|
||||
int32 bit_depth = 7;
|
||||
int32 sample_rate = 8;
|
||||
string source = 9;
|
||||
int32 track_count = 10;
|
||||
repeated string track_names = 11;
|
||||
bool has_cover_art = 12;
|
||||
bool has_cue_sheet = 13;
|
||||
bool has_rip_log = 14;
|
||||
int64 total_audio_size = 15;
|
||||
string download_link = 16;
|
||||
int32 seeders = 17;
|
||||
string tracker = 18;
|
||||
}
|
||||
|
||||
message SearchArtistsRequest {
|
||||
string query = 1;
|
||||
int32 limit = 2;
|
||||
int32 offset = 3;
|
||||
}
|
||||
|
||||
message SearchArtistsResponse {
|
||||
repeated SearchArtistResult artists = 1;
|
||||
int32 total = 2;
|
||||
}
|
||||
|
||||
message SearchArtistResult {
|
||||
string id = 1;
|
||||
string name = 2;
|
||||
string sort_name = 3;
|
||||
string artist_type = 4;
|
||||
string country = 5;
|
||||
string formed_date = 6;
|
||||
string disbanded_date = 7;
|
||||
string description = 8;
|
||||
string image_url = 9;
|
||||
repeated string genres = 10;
|
||||
repeated ExternalId external_ids = 11;
|
||||
}
|
||||
|
||||
message ExternalId {
|
||||
string provider = 1;
|
||||
string id = 2;
|
||||
}
|
||||
|
||||
message GetArtistAlbumsRequest {
|
||||
string artist_id = 1;
|
||||
int32 limit = 2;
|
||||
int32 offset = 3;
|
||||
}
|
||||
|
||||
message GetArtistAlbumsResponse {
|
||||
repeated AlbumResult albums = 1;
|
||||
int32 total = 2;
|
||||
}
|
||||
|
||||
message AlbumResult {
|
||||
string id = 1;
|
||||
string title = 2;
|
||||
string album_type = 3;
|
||||
string release_date = 4;
|
||||
string upc = 5;
|
||||
int32 total_tracks = 6;
|
||||
int32 total_discs = 7;
|
||||
string cover_url = 8;
|
||||
repeated AlbumArtistCredit artists = 9;
|
||||
AlbumLabel label = 10;
|
||||
repeated string genres = 11;
|
||||
repeated ExternalId external_ids = 12;
|
||||
}
|
||||
|
||||
message AlbumArtistCredit {
|
||||
string id = 1;
|
||||
string name = 2;
|
||||
string role = 3;
|
||||
}
|
||||
|
||||
message AlbumLabel {
|
||||
string id = 1;
|
||||
string name = 2;
|
||||
string country = 3;
|
||||
}
|
||||
|
||||
message SubscribeEventsRequest {
|
||||
int64 since_seq = 1;
|
||||
}
|
||||
|
||||
message AlbumEvent {
|
||||
int64 seq = 1;
|
||||
string workflow_run_id = 2;
|
||||
string album_id = 3;
|
||||
string quality = 4;
|
||||
string event_type = 5;
|
||||
string step = 6;
|
||||
string message = 7;
|
||||
bytes data_json = 8;
|
||||
int64 timestamp_ms = 9;
|
||||
}
|
||||
|
||||
enum InteractionMode {
|
||||
INTERACTION_MODE_AUTOMATIC = 0;
|
||||
INTERACTION_MODE_MANUAL = 1;
|
||||
}
|
||||
|
||||
enum MonitorStep {
|
||||
MONITOR_STEP_UNSPECIFIED = 0;
|
||||
MONITOR_STEP_FETCHING_METADATA = 1;
|
||||
MONITOR_STEP_CHECKING_OWNED = 2;
|
||||
MONITOR_STEP_SEARCHING_INDEXER = 3;
|
||||
MONITOR_STEP_PARSING_RESULTS = 4;
|
||||
MONITOR_STEP_FILTERING_QUALITY = 5;
|
||||
MONITOR_STEP_SELECTING_RELEASE = 6;
|
||||
MONITOR_STEP_ADDING_TORRENT = 7;
|
||||
MONITOR_STEP_SAVING = 8;
|
||||
MONITOR_STEP_COMPLETE = 9;
|
||||
}
|
||||
|
||||
enum PromptType {
|
||||
PROMPT_TYPE_UNSPECIFIED = 0;
|
||||
PROMPT_TYPE_CONFIRM = 1;
|
||||
PROMPT_TYPE_SELECT_ONE = 2;
|
||||
PROMPT_TYPE_SELECT_MANY = 3;
|
||||
}
|
||||
|
||||
message MonitorAlbumStreamRequest {
|
||||
oneof message {
|
||||
StartMonitorRequest start = 1;
|
||||
UserDecision decision = 2;
|
||||
CancelRequest cancel = 3;
|
||||
}
|
||||
}
|
||||
|
||||
message StartMonitorRequest {
|
||||
string album_id = 1;
|
||||
IndexerOptions indexer_options = 2;
|
||||
QualityType quality = 3;
|
||||
InteractionMode mode = 4;
|
||||
}
|
||||
|
||||
message UserDecision {
|
||||
string prompt_id = 1;
|
||||
oneof decision {
|
||||
bool confirm = 2;
|
||||
string selected_id = 3;
|
||||
SelectedIds selected_ids = 4;
|
||||
}
|
||||
}
|
||||
|
||||
message SelectedIds {
|
||||
repeated string ids = 1;
|
||||
}
|
||||
|
||||
message CancelRequest {}
|
||||
|
||||
message MonitorAlbumStreamResponse {
|
||||
oneof message {
|
||||
StatusUpdate status = 1;
|
||||
PromptForDecision prompt = 2;
|
||||
MonitorAlbumResponse result = 3;
|
||||
ErrorUpdate error = 4;
|
||||
}
|
||||
}
|
||||
|
||||
message StatusUpdate {
|
||||
MonitorStep step = 1;
|
||||
string message = 2;
|
||||
oneof data {
|
||||
StreamAlbumInfo album_info = 10;
|
||||
TorrentList torrents = 11;
|
||||
ReleaseInfo release_info = 12;
|
||||
}
|
||||
}
|
||||
|
||||
message PromptForDecision {
|
||||
string prompt_id = 1;
|
||||
PromptType type = 2;
|
||||
string message = 3;
|
||||
int32 timeout_seconds = 4;
|
||||
oneof options {
|
||||
ConfirmPrompt confirm = 10;
|
||||
SelectOnePrompt select_one = 11;
|
||||
SelectManyPrompt select_many = 12;
|
||||
}
|
||||
}
|
||||
|
||||
message ErrorUpdate {
|
||||
MonitorStep failed_step = 1;
|
||||
string message = 2;
|
||||
bool recoverable = 3;
|
||||
}
|
||||
|
||||
message StreamAlbumInfo {
|
||||
string artist = 1;
|
||||
string title = 2;
|
||||
string release_date = 3;
|
||||
bool already_owned = 4;
|
||||
string owned_quality = 5;
|
||||
}
|
||||
|
||||
message TorrentList {
|
||||
repeated TorrentSummary torrents = 1;
|
||||
}
|
||||
|
||||
message TorrentSummary {
|
||||
string id = 1;
|
||||
string title = 2;
|
||||
string tracker = 3;
|
||||
int32 seeders = 4;
|
||||
string format = 5;
|
||||
bool lossless = 6;
|
||||
}
|
||||
|
||||
message ReleaseInfo {
|
||||
string info_hash = 1;
|
||||
string format = 2;
|
||||
int32 bit_depth = 3;
|
||||
int32 sample_rate = 4;
|
||||
int32 seeders = 5;
|
||||
string tracker = 6;
|
||||
}
|
||||
|
||||
message ConfirmPrompt {
|
||||
string confirm_label = 1;
|
||||
string cancel_label = 2;
|
||||
bool default_value = 3;
|
||||
}
|
||||
|
||||
message SelectOnePrompt {
|
||||
repeated SelectOption options = 1;
|
||||
string default_id = 2;
|
||||
}
|
||||
|
||||
message SelectManyPrompt {
|
||||
repeated SelectOption options = 1;
|
||||
repeated string default_ids = 2;
|
||||
int32 min_selections = 3;
|
||||
int32 max_selections = 4;
|
||||
}
|
||||
|
||||
message SelectOption {
|
||||
string id = 1;
|
||||
string label = 2;
|
||||
string description = 3;
|
||||
}
|
||||
Reference in New Issue
Block a user