mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
28 lines
442 B
Protocol Buffer
28 lines
442 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package joke;
|
|
|
|
option go_package = "./proto;joke";
|
|
|
|
service Joke {
|
|
rpc Random(RandomRequest) returns (RandomResponse) {}
|
|
}
|
|
|
|
// Get a random joke
|
|
message RandomRequest {
|
|
// the count of random jokes want, maximum: 10
|
|
int32 count = 1;
|
|
}
|
|
|
|
message JokeInfo {
|
|
string id = 1;
|
|
string title = 2;
|
|
string body = 3;
|
|
string category = 4;
|
|
string source = 5;
|
|
}
|
|
|
|
message RandomResponse {
|
|
repeated JokeInfo jokes = 1;
|
|
}
|