rec.proto 675 B

123456789101112131415161718192021222324252627282930
  1. syntax = "proto3";
  2. package recommendservice;
  3. message RecArticle {
  4. int64 id = 1;
  5. }
  6. message RecommendRequest {
  7. // the id of the request user.
  8. int64 uid = 1;
  9. // how many top ranked article for this user.
  10. int32 topk = 2;
  11. // current hour
  12. int32 hour = 3;
  13. // current minute
  14. int32 minute = 4;
  15. // the article list.
  16. repeated RecArticle articles = 5;
  17. }
  18. message RecommendResponse {
  19. repeated int64 articles = 1;
  20. }
  21. service RecommendService {
  22. // the method to get the topk performers for this user.
  23. rpc recommend1(RecommendRequest) returns (RecommendResponse);
  24. rpc recommend2(RecommendRequest) returns (RecommendResponse);
  25. }