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
48 lines
1004 B
Plaintext
48 lines
1004 B
Plaintext
syntax = "v1"
|
|
|
|
info (
|
|
title: "用户接口"
|
|
)
|
|
|
|
type (
|
|
UserInfoResp {
|
|
Id int64 `json:"id"`
|
|
Email string `json:"email"`
|
|
Avatar string `json:"avatar"`
|
|
Balance int64 `json:"balance"`
|
|
Commission int64 `json:"commission"`
|
|
IsAdmin bool `json:"is_admin"`
|
|
}
|
|
|
|
UpdatePasswordReq {
|
|
OldPassword string `json:"old_password"`
|
|
NewPassword string `json:"new_password"`
|
|
}
|
|
|
|
UserSubscribeResp {
|
|
Id int64 `json:"id"`
|
|
SubscribeId int64 `json:"subscribe_id"`
|
|
Name string `json:"name"`
|
|
ExpireAt string `json:"expire_at"`
|
|
Traffic int64 `json:"traffic"`
|
|
UsedTraffic int64 `json:"used_traffic"`
|
|
Token string `json:"token"`
|
|
}
|
|
)
|
|
|
|
@server (
|
|
prefix: /api/v1/user
|
|
group: user
|
|
jwt: JwtAuth
|
|
)
|
|
service ppanel-api {
|
|
@handler GetUserInfoHandler
|
|
get /info returns (UserInfoResp)
|
|
|
|
@handler UpdateUserPasswordHandler
|
|
post /password (UpdatePasswordReq)
|
|
|
|
@handler GetUserSubscribeHandler
|
|
get /subscribe returns ([]UserSubscribeResp)
|
|
}
|