# ADNetworkService
> 高防线路服务

---

## createADNetwork
> 创建线路

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/ADNetworkService/createADNetwork`
- RPC：`rpc createADNetwork(CreateADNetworkRequest) returns (CreateADNetworkResponse);`

**请求对象 (`CreateADNetworkRequest`)**

```json
{
  "name": "string // 名称",
  "description": "string // 描述（备注）"
}
```

**响应对象 (`CreateADNetworkResponse`)**

```json
{
  "adNetworkId": "int64"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/ADNetworkService/createADNetwork" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## deleteADNetwork
> 删除线路

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/ADNetworkService/deleteADNetwork`
- RPC：`rpc deleteADNetwork(DeleteADNetworkRequest) returns (RPCSuccess);`

**请求对象 (`DeleteADNetworkRequest`)**

```json
{
  "adNetworkId": "int64"
}
```

**响应对象 (`RPCSuccess`)**

```json
{}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/ADNetworkService/deleteADNetwork" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## findADNetwork
> 查找单个线路

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/ADNetworkService/findADNetwork`
- RPC：`rpc findADNetwork(FindADNetworkRequest) returns (FindADNetworkResponse);`

**请求对象 (`FindADNetworkRequest`)**

```json
{
  "adNetworkId": "int64"
}
```

**响应对象 (`FindADNetworkResponse`)**

```json
{
  "adNetwork": "ADNetwork"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/ADNetworkService/findADNetwork" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## findAllADNetworks
> 列出所有线路

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/ADNetworkService/findAllADNetworks`
- RPC：`rpc findAllADNetworks(FindAllADNetworkRequest) returns (FindAllADNetworkResponse);`

**请求对象 (`FindAllADNetworkRequest`)**

```json
{}
```

**响应对象 (`FindAllADNetworkResponse`)**

```json
{
  "adNetworks": "[]ADNetwork"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/ADNetworkService/findAllADNetworks" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## findAllAvailableADNetworks
> 列出所有可用的线路

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/ADNetworkService/findAllAvailableADNetworks`
- RPC：`rpc findAllAvailableADNetworks(FindAllAvailableADNetworksRequest) returns (FindAllAvailableADNetworksResponse);`

**请求对象 (`FindAllAvailableADNetworksRequest`)**

```json
{}
```

**响应对象 (`FindAllAvailableADNetworksResponse`)**

```json
{
  "adNetworks": "[]ADNetwork"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/ADNetworkService/findAllAvailableADNetworks" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## updateADNetwork
> 修改线路

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/ADNetworkService/updateADNetwork`
- RPC：`rpc updateADNetwork(UpdateADNetworkRequest) returns (RPCSuccess);`

**请求对象 (`UpdateADNetworkRequest`)**

```json
{
  "adNetworkId": "int64",
  "isOn": "bool // 是否启用",
  "name": "string // 名称",
  "description": "string // 描述（备注）"
}
```

**响应对象 (`RPCSuccess`)**

```json
{}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/ADNetworkService/updateADNetwork" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---
