stdlib.proto 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. syntax = "proto3";
  2. package stdlib;
  3. message DocQueryRequest {
  4. string keyWords = 1; //检索词
  5. int32 pageNum = 2; //页码
  6. }
  7. message DocQueryResponse {
  8. int32 code = 1; //响应代码
  9. string message = 2; //响应消息
  10. repeated Doc docs = 3;//文档列表集合,没有分页参数
  11. int32 total = 4; //总数
  12. }
  13. message Doc {
  14. string id = 1;//文档id
  15. string name = 2;//文档名称
  16. int32 type = 3;//文档类型
  17. int32 fileSize = 4;//文档大小
  18. int32 pageSize = 5;//文档页码数
  19. string tags = 6;//文档标签
  20. string userId = 7;//上传人id
  21. }
  22. message DocChangeReq {
  23. string id = 1; //文档id
  24. int32 reason = 2; //处理原因 1机审通过上架 2人审通过上加 10投诉下架 11过期下架
  25. }
  26. message DocChangeResp {
  27. bool state = 1; //是否成功
  28. }
  29. service Stdlib {
  30. rpc DocQuery(DocQueryRequest) returns(DocQueryResponse); //文档检索
  31. rpc DocOn(DocChangeReq) returns(DocChangeResp); //文档上架
  32. rpc DocOff(DocChangeReq) returns(DocChangeResp); //文档下架
  33. }