118 lines
2.1 KiB
Markdown
118 lines
2.1 KiB
Markdown
|
|
# PagesStorageService
|
|||
|
|
> PagesStorage相关服务
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## createPagesStorage
|
|||
|
|
> 创建pages 存储
|
|||
|
|
|
|||
|
|
- 角色:`admin`
|
|||
|
|
- HTTP:`POST https://backend.dooki.cloud/PagesStorageService/createPagesStorage`
|
|||
|
|
- RPC:`rpc createPagesStorage(CreatePagesStorageRequest) returns (CreatePagesStorageResponse);`
|
|||
|
|
|
|||
|
|
**请求对象 (`CreatePagesStorageRequest`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{
|
|||
|
|
"type": "string",
|
|||
|
|
"name": "string // 名称",
|
|||
|
|
"adminId": "int64 // 管理员ID",
|
|||
|
|
"settingJSON": "bytes"
|
|||
|
|
}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**响应对象 (`CreatePagesStorageResponse`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{
|
|||
|
|
"id": "int64"
|
|||
|
|
}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**调用示例**
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
curl -X POST "https://backend.dooki.cloud/PagesStorageService/createPagesStorage" \
|
|||
|
|
-H "Content-Type: application/json" \
|
|||
|
|
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
|||
|
|
-d '{
|
|||
|
|
...
|
|||
|
|
}'
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## deletePagesStorage
|
|||
|
|
> 删除pages 存储
|
|||
|
|
|
|||
|
|
- 角色:`admin`
|
|||
|
|
- HTTP:`POST https://backend.dooki.cloud/PagesStorageService/deletePagesStorage`
|
|||
|
|
- RPC:`rpc deletePagesStorage(DeletePagesStorageRequest) returns (RPCSuccess);`
|
|||
|
|
|
|||
|
|
**请求对象 (`DeletePagesStorageRequest`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{
|
|||
|
|
"id": "int64"
|
|||
|
|
}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**响应对象 (`RPCSuccess`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**调用示例**
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
curl -X POST "https://backend.dooki.cloud/PagesStorageService/deletePagesStorage" \
|
|||
|
|
-H "Content-Type: application/json" \
|
|||
|
|
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
|||
|
|
-d '{
|
|||
|
|
...
|
|||
|
|
}'
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## listPagesStorages
|
|||
|
|
> 列出pages 存储
|
|||
|
|
|
|||
|
|
- 角色:`admin`
|
|||
|
|
- HTTP:`POST https://backend.dooki.cloud/PagesStorageService/listPagesStorages`
|
|||
|
|
- RPC:`rpc listPagesStorages(ListPagesStoragesRequest) returns (ListPagesStoragesResponse);`
|
|||
|
|
|
|||
|
|
**请求对象 (`ListPagesStoragesRequest`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{
|
|||
|
|
"type": "string",
|
|||
|
|
"name": "string // 名称",
|
|||
|
|
"adminId": "int64 // 管理员ID",
|
|||
|
|
"isDeleted": "BoolValue // 是否已删除"
|
|||
|
|
}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**响应对象 (`ListPagesStoragesResponse`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{
|
|||
|
|
"total": "int64",
|
|||
|
|
"storages": "[]PagesStorage"
|
|||
|
|
}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**调用示例**
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
curl -X POST "https://backend.dooki.cloud/PagesStorageService/listPagesStorages" \
|
|||
|
|
-H "Content-Type: application/json" \
|
|||
|
|
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
|||
|
|
-d '{
|
|||
|
|
...
|
|||
|
|
}'
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
---
|