初始化
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

This commit is contained in:
2026-02-26 04:12:43 -08:00
commit 9dacd85a89
210 changed files with 8261 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
syntax = "v1"
info (
title: "认证接口"
)
type (
UserLoginReq {
Email string `json:"email"`
Password string `json:"password"`
}
UserRegisterReq {
Email string `json:"email"`
Password string `json:"password"`
Code string `json:"code"`
ReferCode string `json:"refer_code,optional"`
}
AuthResp {
Token string `json:"token"`
Expire int64 `json:"expire"`
}
ResetPasswordReq {
Email string `json:"email"`
Password string `json:"password"`
Code string `json:"code"`
}
)
@server (
prefix: /api/v1/auth
group: auth
)
service ppanel-api {
@handler UserLoginHandler
post /login (UserLoginReq) returns (AuthResp)
@handler UserRegisterHandler
post /register (UserRegisterReq) returns (AuthResp)
@handler ResetPasswordHandler
post /reset_password (ResetPasswordReq)
}
+38
View File
@@ -0,0 +1,38 @@
syntax = "v1"
info (
title: "公共接口"
)
@server (
prefix: /api/v1
group: common
)
service ppanel-api {
@handler HealthHandler
get /health returns (HealthResp)
@handler GetGlobalConfigHandler
get /config returns (GlobalConfigResp)
@handler SendEmailCodeHandler
post /send_email_code (SendEmailCodeReq)
@handler GetAnnouncementListHandler
get /announcement returns ([]AnnouncementResp)
@handler GetDocumentListHandler
get /document returns ([]DocumentListResp)
@handler GetDocumentDetailHandler
get /document/:id (DocumentDetailReq) returns (DocumentDetailResp)
@handler GetAvailablePaymentMethodsHandler
get /payment/methods returns ([]PaymentMethodResp)
@handler GetSubscribeGroupListHandler
get /subscribe/group returns ([]SubscribeGroupResp)
@handler GetSubscribeListHandler
get /subscribe returns ([]SubscribeResp)
}
+47
View File
@@ -0,0 +1,47 @@
syntax = "v1"
info (
title: "订单接口"
)
type (
CreateOrderReq {
SubscribeId int64 `json:"subscribe_id"`
CouponCode string `json:"coupon_code,optional"`
PaymentId int64 `json:"payment_id"`
Period string `json:"period"`
}
OrderResp {
Id int64 `json:"id"`
OrderNo string `json:"order_no"`
Amount int64 `json:"amount"`
Status int `json:"status"`
PaymentUrl string `json:"payment_url,omitempty"`
CreatedAt string `json:"created_at"`
}
OrderDetailReq {
OrderNo string `path:"order_no"`
}
CloseOrderReq {
OrderNo string `path:"order_no"`
}
)
@server (
prefix: /api/v1/order
group: order
jwt: JwtAuth
)
service ppanel-api {
@handler CreateOrderHandler
post /create (CreateOrderReq) returns (OrderResp)
@handler GetOrderDetailHandler
get /:order_no (OrderDetailReq) returns (OrderResp)
@handler CloseOrderHandler
post /:order_no/close (CloseOrderReq)
}
+44
View File
@@ -0,0 +1,44 @@
syntax = "v1"
info (
title: "工单接口"
)
type (
CreateTicketReq {
Title string `json:"title"`
Content string `json:"content"`
}
TicketResp {
Id int64 `json:"id"`
Title string `json:"title"`
Status int `json:"status"`
CreatedAt string `json:"created_at"`
}
TicketDetailReq {
Id int64 `path:"id"`
}
CreateTicketFollowReq {
Id int64 `path:"id"`
Content string `json:"content"`
}
)
@server (
prefix: /api/v1/ticket
group: ticket
jwt: JwtAuth
)
service ppanel-api {
@handler CreateTicketHandler
post /create (CreateTicketReq) returns (TicketResp)
@handler GetTicketDetailHandler
get /:id (TicketDetailReq) returns (TicketResp)
@handler CreateTicketFollowHandler
post /:id/follow (CreateTicketFollowReq)
}
+65
View File
@@ -0,0 +1,65 @@
syntax = "v1"
info (
title: "公共类型定义"
)
type (
HealthResp {
Status string `json:"status"`
}
GlobalConfigResp {
SiteName string `json:"site_name"`
SiteDesc string `json:"site_desc"`
SiteLogo string `json:"site_logo"`
ForceHttps bool `json:"force_https"`
StopRegister bool `json:"stop_register"`
}
SendEmailCodeReq {
Email string `json:"email"`
}
AnnouncementResp {
Id int64 `json:"id"`
Title string `json:"title"`
Content string `json:"content"`
CreatedAt string `json:"created_at"`
}
DocumentListResp {
Id int64 `json:"id"`
Title string `json:"title"`
}
DocumentDetailReq {
Id int64 `path:"id"`
}
DocumentDetailResp {
Id int64 `json:"id"`
Title string `json:"title"`
Content string `json:"content"`
}
PaymentMethodResp {
Id int64 `json:"id"`
Name string `json:"name"`
Platform string `json:"platform"`
Icon string `json:"icon"`
}
SubscribeGroupResp {
Id int64 `json:"id"`
Name string `json:"name"`
}
SubscribeResp {
Id int64 `json:"id"`
Name string `json:"name"`
Price int64 `json:"price"`
Traffic int64 `json:"traffic"`
GroupId int64 `json:"group_id"`
}
)
+47
View File
@@ -0,0 +1,47 @@
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)
}