stdlib.proto 920 B

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. }
  25. message DocChangeResp {
  26. bool state = 1; //是否成功
  27. }
  28. service Stdlib {
  29. rpc DocQuery(DocQueryRequest) returns(DocQueryResponse); //文档检索
  30. rpc DocOn(DocChangeReq) returns(DocChangeResp); //文档上架
  31. rpc DocOff(DocChangeReq) returns(DocChangeResp); //文档下架
  32. }