feat: basic music backend
This commit is contained in:
20
proto/library.proto
Normal file
20
proto/library.proto
Normal file
@@ -0,0 +1,20 @@
|
||||
syntax = "proto3";
|
||||
|
||||
import 'google/protobuf/empty.proto';
|
||||
|
||||
package library;
|
||||
|
||||
service Library {
|
||||
rpc ListTracks(google.protobuf.Empty) returns (TrackList);
|
||||
}
|
||||
|
||||
message TrackList {
|
||||
repeated Track tracks = 1;
|
||||
}
|
||||
|
||||
message Track {
|
||||
string hash = 1;
|
||||
string name = 2;
|
||||
string artist_name = 3;
|
||||
uint64 artist_id = 4;
|
||||
}
|
||||
18
proto/player.proto
Normal file
18
proto/player.proto
Normal file
@@ -0,0 +1,18 @@
|
||||
syntax = "proto3";
|
||||
|
||||
import 'google/protobuf/empty.proto';
|
||||
|
||||
package player;
|
||||
|
||||
service Player {
|
||||
rpc PlayTrack(PlayTrackRequest) returns (PlayTrackResponse);
|
||||
rpc ResumeTrack(google.protobuf.Empty) returns (google.protobuf.Empty);
|
||||
rpc PauseTrack(google.protobuf.Empty) returns (google.protobuf.Empty);
|
||||
}
|
||||
|
||||
message PlayTrackRequest {
|
||||
string hash = 1;
|
||||
}
|
||||
|
||||
message PlayTrackResponse {
|
||||
}
|
||||
43
proto/settings.proto
Normal file
43
proto/settings.proto
Normal file
@@ -0,0 +1,43 @@
|
||||
syntax = "proto3";
|
||||
|
||||
import 'google/protobuf/empty.proto';
|
||||
|
||||
package settings;
|
||||
|
||||
service Settings {
|
||||
rpc ListPaths(google.protobuf.Empty) returns (SettingsData);
|
||||
rpc AddPath(AddPathRequest) returns (AddPathResponse);
|
||||
rpc DeletePath(DeletePathRequest) returns (DeletePathResponse);
|
||||
rpc RefreshPath(RefreshPathRequest) returns (RefreshPathResponse);
|
||||
}
|
||||
|
||||
message SettingsData {
|
||||
repeated LibraryPath library_paths = 1;
|
||||
}
|
||||
|
||||
message LibraryPath {
|
||||
uint64 id = 1;
|
||||
string path = 2;
|
||||
}
|
||||
|
||||
message AddPathRequest {
|
||||
string path = 1;
|
||||
}
|
||||
|
||||
message AddPathResponse {
|
||||
uint64 id = 1;
|
||||
}
|
||||
|
||||
message DeletePathRequest {
|
||||
uint64 id = 1;
|
||||
}
|
||||
|
||||
message DeletePathResponse {
|
||||
}
|
||||
|
||||
message RefreshPathRequest {
|
||||
uint64 id = 1;
|
||||
}
|
||||
|
||||
message RefreshPathResponse {
|
||||
}
|
||||
Reference in New Issue
Block a user