import "../base.api" type ( // The response data of server information | Server信息 ServerInfo { BaseIDInfo // Status 1: normal 2: ban | 状态 1 正常 2 禁用 Status *uint8 `json:"status,optional"` // 名称 Name *string `json:"name,optional"` // 公网ip PublicIp *string `json:"publicIp,optional"` // 内网ip PrivateIp *string `json:"privateIp,optional"` // 管理端口 AdminPort *string `json:"adminPort,optional"` } // The response data of server list | Server列表数据 ServerListResp { BaseDataInfo // Server list data | Server列表数据 Data ServerListInfo `json:"data"` } // Server list data | Server列表数据 ServerListInfo { BaseListInfo // The API list data | Server列表数据 Data []ServerInfo `json:"data"` } // Get server list request params | Server列表请求参数 ServerListReq { PageInfo // 名称 Name *string `json:"name,optional"` // 公网ip PublicIp *string `json:"publicIp,optional"` // 内网ip PrivateIp *string `json:"privateIp,optional"` } // Server information response | Server信息返回体 ServerInfoResp { BaseDataInfo // Server information | Server数据 Data ServerInfo `json:"data"` } ) @server( jwt: Auth group: WechatServer middleware: Authority ) service Wechat { // Create server information | 创建Server @handler createServer post /server/create (ServerInfo) returns (BaseMsgResp) // Update server information | 更新Server @handler updateServer post /server/update (ServerInfo) returns (BaseMsgResp) // Delete server information | 删除Server信息 @handler deleteServer post /server/delete (IDsReq) returns (BaseMsgResp) // Get server list | 获取Server列表 @handler getServerList post /server/list (ServerListReq) returns (ServerListResp) // Get server by ID | 通过ID获取Server @handler getServerById post /server (IDReq) returns (ServerInfoResp) }