syntax = "v1" info ( title: "节点通信接口" ) type ( PushStatusReq { CPU float64 `json:"cpu"` Mem float64 `json:"mem"` Disk float64 `json:"disk"` OnlineUsers int `json:"online_users"` Uptime int64 `json:"uptime"` } UserTraffic { UserId int64 `json:"user_id"` Upload int64 `json:"upload"` Download int64 `json:"download"` } PushUserTrafficReq { Data []UserTraffic `json:"data"` } OnlineUser { UserId int64 `json:"user_id"` IP string `json:"ip"` } PushOnlineUsersReq { Data []OnlineUser `json:"data"` } ServerConfigResp { Id int64 `json:"id"` Name string `json:"name"` Protocol string `json:"protocol"` Config map[string]string `json:"config"` } ServerUserResp { Id int64 `json:"id"` Token string `json:"token"` Speed int64 `json:"speed"` DeviceLimit int `json:"device_limit"` } ) @server ( prefix: /api/v1/node group: node middleware: NodeAuthMiddleware ) service ppanelnode { @handler GetServerConfigHandler get /config returns (ServerConfigResp) @handler GetServerUserListHandler get /users returns ([]ServerUserResp) @handler PushStatusHandler post /status (PushStatusReq) @handler PushUserTrafficHandler post /traffic (PushUserTrafficReq) @handler PushOnlineUsersHandler post /online (PushOnlineUsersReq) }