Some checks failed
Build docker and publish / prepare (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.admin image_name:ppanel-admin name:admin]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.api image_name:ppanel-api name:api]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.node image_name:ppanel-node name:node]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.queue image_name:ppanel-queue name:queue]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.scheduler image_name:ppanel-scheduler name:scheduler]) (push) Has been cancelled
Build docker and publish / deploy (push) Has been cancelled
Build docker and publish / notify (push) Has been cancelled
65 lines
1.2 KiB
Plaintext
65 lines
1.2 KiB
Plaintext
syntax = "v1"
|
|
|
|
info (
|
|
title: "服务器管理"
|
|
)
|
|
|
|
type (
|
|
ServerListReq {
|
|
Page int `form:"page,default=1"`
|
|
PageSize int `form:"page_size,default=20"`
|
|
}
|
|
|
|
ServerResp {
|
|
Id int64 `json:"id"`
|
|
Name string `json:"name"`
|
|
Address string `json:"address"`
|
|
Port int `json:"port"`
|
|
Protocol string `json:"protocol"`
|
|
Enable bool `json:"enable"`
|
|
}
|
|
|
|
ServerListResp {
|
|
Total int64 `json:"total"`
|
|
List []ServerResp `json:"list"`
|
|
}
|
|
|
|
CreateServerReq {
|
|
Name string `json:"name"`
|
|
Address string `json:"address"`
|
|
Port int `json:"port"`
|
|
Protocol string `json:"protocol"`
|
|
}
|
|
|
|
UpdateServerReq {
|
|
Id int64 `path:"id"`
|
|
Name string `json:"name"`
|
|
Address string `json:"address"`
|
|
Port int `json:"port"`
|
|
Protocol string `json:"protocol"`
|
|
}
|
|
|
|
DeleteServerReq {
|
|
Id int64 `path:"id"`
|
|
}
|
|
)
|
|
|
|
@server (
|
|
prefix: /api/v1/admin/server
|
|
group: server
|
|
jwt: JwtAuth
|
|
)
|
|
service ppaneladmin {
|
|
@handler GetServerListHandler
|
|
get /list (ServerListReq) returns (ServerListResp)
|
|
|
|
@handler CreateServerHandler
|
|
post /create (CreateServerReq) returns (ServerResp)
|
|
|
|
@handler UpdateServerHandler
|
|
put /:id (UpdateServerReq)
|
|
|
|
@handler DeleteServerHandler
|
|
delete /:id (DeleteServerReq)
|
|
}
|