-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatalake.proto
More file actions
102 lines (81 loc) · 2.42 KB
/
datalake.proto
File metadata and controls
102 lines (81 loc) · 2.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
syntax = "proto3";
package tensorbeat.datalake;
option go_package = "./proto;proto";
import "tensorbeat/common.proto";
enum Filter {
ANY = 0;
ALL = 1;
NONE = 2;
}
message GetSongsByTagsRequest {
/*
Pass in map of tags to be matched on returned songs
EX:
{
"genre": "rock",
"spectrogram_id": "*",
}
The tags will be combined using the filter:
- ANY means songs matching any of the tags will be returned.
- ALL means songs matching all of the tags will be returned.
- NONE means songs that dont match any of the tags will be returned.
Using an * for the value will return any song with that tag set.
Using a specific value for the tag will return only songs with that exact combination of Key/Value
*/
map<string, string> tags = 1;
Filter filter = 2;
optional int64 page_token = 3;
optional int64 page_size = 4;
}
message GetSongsByTagsResponse {
repeated tensorbeat.common.File songs = 1;
int64 next_page_token = 2;
int64 total_size = 3;
}
message AddSongsRequest {
repeated tensorbeat.common.AddFile songs = 1;
}
message AddSongsResponse {
bool successful = 1;
}
message AddTagsRequest {
string id = 1;
map<string, string> tags = 2;
}
message AddTagsResponse {
bool successful = 1;
}
message RemoveTagsRequest {
string id = 1;
map<string, string> tags = 2;
}
message RemoveTagsResponse {
bool successful = 1;
}
message GetAllSongsRequest {
optional int64 page_token = 1;
optional int64 page_size = 2;
}
message GetAllSongsResponse {
repeated tensorbeat.common.File songs = 1;
int64 next_page_token = 2;
int64 total_size = 3;
}
message GetSongsByIDsRequest {
repeated string ids = 1;
optional int64 page_token = 2;
optional int64 page_size = 3;
}
message GetSongsByIDsResponse {
repeated tensorbeat.common.File songs = 1;
int64 next_page_token = 2;
int64 total_size = 3;
}
service DatalakeService {
rpc GetAllSongs(GetAllSongsRequest) returns (GetAllSongsResponse);
rpc GetSongsByIDs(GetSongsByIDsRequest) returns (GetSongsByIDsResponse);
rpc GetSongsByTags(GetSongsByTagsRequest) returns (GetSongsByTagsResponse);
rpc AddSongs(AddSongsRequest) returns (AddSongsResponse);
rpc AddTags(AddTagsRequest) returns (AddTagsResponse);
rpc RemoveTags(RemoveTagsRequest) returns (RemoveTagsResponse);
}