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
52 lines
979 B
Plaintext
52 lines
979 B
Plaintext
syntax = "v1"
|
|
|
|
info (
|
|
title: "用户管理"
|
|
)
|
|
|
|
type (
|
|
AdminUserListReq {
|
|
Page int `form:"page,default=1"`
|
|
PageSize int `form:"page_size,default=20"`
|
|
Search string `form:"search,optional"`
|
|
}
|
|
|
|
AdminUserResp {
|
|
Id int64 `json:"id"`
|
|
Email string `json:"email"`
|
|
Balance int64 `json:"balance"`
|
|
IsAdmin bool `json:"is_admin"`
|
|
Enable bool `json:"enable"`
|
|
CreatedAt string `json:"created_at"`
|
|
}
|
|
|
|
AdminUserListResp {
|
|
Total int64 `json:"total"`
|
|
List []AdminUserResp `json:"list"`
|
|
}
|
|
|
|
AdminUserDetailReq {
|
|
Id int64 `path:"id"`
|
|
}
|
|
|
|
AdminDeleteUserReq {
|
|
Id int64 `path:"id"`
|
|
}
|
|
)
|
|
|
|
@server (
|
|
prefix: /api/v1/admin/user
|
|
group: user
|
|
jwt: JwtAuth
|
|
)
|
|
service ppaneladmin {
|
|
@handler GetUserListHandler
|
|
get /list (AdminUserListReq) returns (AdminUserListResp)
|
|
|
|
@handler GetUserDetailHandler
|
|
get /:id (AdminUserDetailReq) returns (AdminUserResp)
|
|
|
|
@handler DeleteUserHandler
|
|
delete /:id (AdminDeleteUserReq)
|
|
}
|