来源:摩枫网络科技
浏览 471
扫码
分享
2024-11-19 11:16:20
api/v1/document.proto
CreateDocumentItem
创建文档
Field |
Type |
Label |
Description |
title |
string |
|
文档标题 |
attachment_id |
int64 |
|
文档附件ID |
price |
int32 |
|
文档价格 |
CreateDocumentRequest
创建文档
DeleteDocumentRequest
删除文档,放入回收站
Field |
Type |
Label |
Description |
id |
int64 |
repeated |
Document
文档
DocumentScore
文档评分
DownloadDocumentReply
文档下载
Field |
Type |
Label |
Description |
url |
string |
|
GetDocumentRequest
查询文档
Field |
Type |
Label |
Description |
id |
int64 |
|
文档ID |
with_author |
bool |
|
是否查询作者信息 |
ListDocumentForHomeItem
首页文档查询返回项
Field |
Type |
Label |
Description |
category_id |
int64 |
|
分类ID |
category_cover |
string |
|
分类封面 |
category_name |
string |
|
分类名称 |
document |
Document |
repeated |
文档列表 |
ListDocumentForHomeRequest
查询文档(针对首页的查询)
Field |
Type |
Label |
Description |
limit |
int64 |
|
ListDocumentForHomeResponse
查询文档(针对首页的查询)
ListDocumentReply
文档列表
Field |
Type |
Label |
Description |
total |
int64 |
|
文档总数 |
document |
Document |
repeated |
文档列表 |
ListDocumentRequest
文档列表
Field |
Type |
Label |
Description |
page |
int64 |
|
页码 |
size |
int64 |
|
每页数量 |
wd |
string |
|
搜索关键字 |
field |
string |
repeated |
查询字段 |
order |
string |
|
排序 |
category_id |
int64 |
repeated |
分类ID |
user_id |
int64 |
repeated |
用户ID |
status |
int32 |
repeated |
文档状态 |
is_recommend |
bool |
repeated |
是否推荐 |
limit |
int64 |
|
查询数量显示。当该值大于0时,page和size无效 |
RecoverRecycleDocumentRequest
恢复文档
Field |
Type |
Label |
Description |
id |
int64 |
repeated |
SearchDocumentReply
文档搜索响应
Field |
Type |
Label |
Description |
total |
int64 |
|
文档总数 |
spend |
string |
|
搜索耗时 |
document |
Document |
repeated |
文档列表 |
SearchDocumentRequest
文档搜索
SetDocumentRecommendRequest
设置文档推荐
Field |
Type |
Label |
Description |
id |
int64 |
repeated |
文档ID |
type |
int32 |
|
0, 取消推荐,1:推荐 2:重新推荐 |
DocumentAPI
文档服务
RecycleAPI
Scalar Value Types
.proto Type |
Notes |
C++ |
Java |
Python |
Go |
C# |
PHP |
Ruby |
double |
|
double |
double |
float |
float64 |
double |
float |
Float |
float |
|
float |
float |
float |
float32 |
float |
float |
Float |
int32 |
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. |
int32 |
int |
int |
int32 |
int |
integer |
Bignum or Fixnum (as required) |
int64 |
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. |
int64 |
long |
int/long |
int64 |
long |
integer/string |
Bignum |
uint32 |
Uses variable-length encoding. |
uint32 |
int |
int/long |
uint32 |
uint |
integer |
Bignum or Fixnum (as required) |
uint64 |
Uses variable-length encoding. |
uint64 |
long |
int/long |
uint64 |
ulong |
integer/string |
Bignum or Fixnum (as required) |
sint32 |
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. |
int32 |
int |
int |
int32 |
int |
integer |
Bignum or Fixnum (as required) |
sint64 |
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. |
int64 |
long |
int/long |
int64 |
long |
integer/string |
Bignum |
fixed32 |
Always four bytes. More efficient than uint32 if values are often greater than 2^28. |
uint32 |
int |
int |
uint32 |
uint |
integer |
Bignum or Fixnum (as required) |
fixed64 |
Always eight bytes. More efficient than uint64 if values are often greater than 2^56. |
uint64 |
long |
int/long |
uint64 |
ulong |
integer/string |
Bignum |
sfixed32 |
Always four bytes. |
int32 |
int |
int |
int32 |
int |
integer |
Bignum or Fixnum (as required) |
sfixed64 |
Always eight bytes. |
int64 |
long |
int/long |
int64 |
long |
integer/string |
Bignum |
bool |
|
bool |
boolean |
boolean |
bool |
bool |
boolean |
TrueClass/FalseClass |
string |
A string must always contain UTF-8 encoded or 7-bit ASCII text. |
string |
String |
str/unicode |
string |
string |
string |
String (UTF-8) |
bytes |
May contain any arbitrary sequence of bytes. |
string |
ByteString |
str |
[]byte |
ByteString |
string |
String (ASCII-8BIT) |