ControlProxy/control-proxy-backend/yjs/README.md

87 lines
1.6 KiB
Markdown
Raw Normal View History

2022-04-19 01:26:59 +00:00
# 函数名addRepo
## 参数
可接收JSON或是JSON字符串格式如下
```
{"doId":"bdware.ss/Repox"}
```
## 返回结果
code为0表示成功为1表示失败。msg为失败原因。
```
{"msg":"success","rrt":"110ms","code":0}
```
# 函数名pingRepo
## 参数
可接收JSON或是JSON字符串格式如下
```
{"doId":"bdware.ss/Repox"}
```
## 返回结果
code为0表示成功为1表示失败。msg为失败原因。
成功的时候会返回rrt表示ping所花的时间。
```
{"msg":"success","rrt":"110ms","code":0}
```
# 函数名getRepoList
## 参数
```
无参数
```
## 返回结果
```
[
{
"doId":"bdware.ss/Repo13",
"address":"tcp://127.0.0.1:20513",
"owner":"user13",
"version":"2.1",
"descritpion":"这是bdware.ss的第13号数字对象仓库",
"createDate":"2022-01-03"
},
{
"doId":"bdware.ss/Repo14",
"address":"tcp://127.0.0.1:20514",
"owner":"user14",
"version":"2.1",
"descritpion":"这是bdware.ss的第14号数字对象仓库",
"createDate":"2022-01-03"
}]
```
# 函数名deleteRepo
## 参数
```
{"doId":"bdware.ss/Repox"}
```
## 返回结果
```
{"msg":"success","code":0}
```
# 函数名deleteRepoList
## 参数
```
[{"doId":"bdware.ss/Repox"},{"doId":"bdware.ss/Repoy"}]
```
## 返回结果
```
{"msg":"success","code":0}
```
# 函数名updateRepo
## 参数
```
{
"doId":"bdware.ss/Repo14",
"address":"tcp://127.0.0.1:20514",
"owner":"user14",
"version":"2.1",
"descritpion":"这是bdware.ss的第14号数字对象仓库",
}
```
## 返回结果
```
{"msg":"success","code":0}
```