1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- syntax = "proto3";
- package stdlib;
- message DocQueryRequest {
- string keyWords = 1; //检索词
- int32 pageNum = 2; //页码
- }
- message DocQueryResponse {
- int32 code =1; //响应代码
- string message=2; //响应消息
- repeated Doc docs=3;//文档列表集合,没有分页参数
- int32 total = 4; //总数
- }
- message Doc {
- string id=1;//文档id
- string name=2;//文档名称
- int32 type=3;//文档类型
- int32 fileSize=4;//文档大小
- int32 pageSize=5;//文档页码数
- string tags=6;//文档标签
- string userId=7;//上传人id
- }
- message DocChangeReq {
- string id = 1; //文档id
- }
- message DocChangeResp {
- bool state = 1; //是否成功
- }
- service Stdlib {
- rpc DocQuery(DocQueryRequest) returns(DocQueryResponse); //文档检索
- rpc DocOn(DocChangeReq) returns(DocChangeResp); //文档上架
- rpc DocOff(DocChangeReq) returns(DocChangeResp); //文档下架
- }
|