-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: combining protos into one file and commiting output to src/protos
- Loading branch information
1 parent
692b9d1
commit 1189fc1
Showing
27 changed files
with
3,001 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
syntax = "proto3"; | ||
|
||
package ratings; | ||
|
||
// Import dependencies | ||
import "google/protobuf/empty.proto"; | ||
import "google/protobuf/timestamp.proto"; | ||
|
||
// App service | ||
service App { | ||
rpc GetRating (GetRatingRequest) returns (GetRatingResponse) {} | ||
} | ||
|
||
message GetRatingRequest { | ||
string snap_id = 1; | ||
} | ||
|
||
message GetRatingResponse { | ||
Rating rating = 1; | ||
} | ||
|
||
// Chart service | ||
service Chart { | ||
rpc GetChart (GetChartRequest) returns (GetChartResponse) {} | ||
} | ||
|
||
message GetChartRequest { | ||
Timeframe timeframe = 1; | ||
optional Category category = 2; | ||
} | ||
|
||
message GetChartResponse { | ||
Timeframe timeframe = 1; | ||
repeated ChartData ordered_chart_data = 2; | ||
optional Category category = 3; | ||
} | ||
|
||
message ChartData { | ||
float raw_rating = 1; | ||
Rating rating = 2; | ||
} | ||
|
||
enum Timeframe { | ||
TIMEFRAME_UNSPECIFIED = 0; | ||
TIMEFRAME_WEEK = 1; | ||
TIMEFRAME_MONTH = 2; | ||
} | ||
|
||
enum Category { | ||
ART_AND_DESIGN = 0; | ||
BOOK_AND_REFERENCE = 1; | ||
DEVELOPMENT = 2; | ||
DEVICES_AND_IOT = 3; | ||
EDUCATION = 4; | ||
ENTERTAINMENT = 5; | ||
FEATURED = 6; | ||
FINANCE = 7; | ||
GAMES = 8; | ||
HEALTH_AND_FITNESS = 9; | ||
MUSIC_AND_AUDIO = 10; | ||
NEWS_AND_WEATHER = 11; | ||
PERSONALISATION = 12; | ||
PHOTO_AND_VIDEO = 13; | ||
PRODUCTIVITY = 14; | ||
SCIENCE = 15; | ||
SECURITY = 16; | ||
SERVER_AND_CLOUD = 17; | ||
SOCIAL = 18; | ||
UTILITIES = 19; | ||
} | ||
|
||
// User service | ||
service User { | ||
rpc Authenticate (AuthenticateRequest) returns (AuthenticateResponse) {} | ||
|
||
rpc Delete (google.protobuf.Empty) returns (google.protobuf.Empty) {} | ||
rpc Vote (VoteRequest) returns (google.protobuf.Empty) {} | ||
rpc ListMyVotes (ListMyVotesRequest) returns (ListMyVotesResponse) {} | ||
rpc GetSnapVotes(GetSnapVotesRequest) returns (GetSnapVotesResponse) {} | ||
} | ||
|
||
message AuthenticateRequest { | ||
string id = 1; | ||
} | ||
|
||
message AuthenticateResponse { | ||
string token = 1; | ||
} | ||
|
||
message ListMyVotesRequest { | ||
string snap_id_filter = 1; | ||
} | ||
|
||
message ListMyVotesResponse { | ||
repeated Vote votes = 1; | ||
} | ||
|
||
message GetSnapVotesRequest { | ||
string snap_id = 1; | ||
} | ||
|
||
message GetSnapVotesResponse { | ||
repeated Vote votes = 1; | ||
} | ||
|
||
message Vote { | ||
string snap_id = 1; | ||
int32 snap_revision = 2; | ||
bool vote_up = 3; | ||
google.protobuf.Timestamp timestamp = 4; | ||
} | ||
|
||
message VoteRequest { | ||
string snap_id = 1; | ||
int32 snap_revision = 2; | ||
bool vote_up = 3; | ||
} | ||
|
||
// Common messages | ||
message Rating { | ||
string snap_id = 1; | ||
uint64 total_votes = 2; | ||
RatingsBand ratings_band = 3; | ||
} | ||
|
||
enum RatingsBand { | ||
VERY_GOOD = 0; | ||
GOOD = 1; | ||
NEUTRAL = 2; | ||
POOR = 3; | ||
VERY_POOR = 4; | ||
INSUFFICIENT_VOTES = 5; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.