Files
go-zero/tools/goctl/example/rec.proto
2020-07-29 17:12:04 +08:00

31 lines
675 B
Protocol Buffer

syntax = "proto3";
package recommendservice;
message RecArticle {
int64 id = 1;
}
message RecommendRequest {
// the id of the request user.
int64 uid = 1;
// how many top ranked article for this user.
int32 topk = 2;
// current hour
int32 hour = 3;
// current minute
int32 minute = 4;
// the article list.
repeated RecArticle articles = 5;
}
message RecommendResponse {
repeated int64 articles = 1;
}
service RecommendService {
// the method to get the topk performers for this user.
rpc recommend1(RecommendRequest) returns (RecommendResponse);
rpc recommend2(RecommendRequest) returns (RecommendResponse);
}