fix(api): standardize formatting and add missing newlines in API files
This commit is contained in:
parent
987e25e7ac
commit
1a849fd461
@ -75,4 +75,5 @@ service ppanel {
|
|||||||
@doc "Get Ads Detail"
|
@doc "Get Ads Detail"
|
||||||
@handler GetAdsDetail
|
@handler GetAdsDetail
|
||||||
get /detail (GetAdsDetailRequest) returns (Ads)
|
get /detail (GetAdsDetailRequest) returns (Ads)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -72,4 +72,5 @@ service ppanel {
|
|||||||
@doc "Get announcement"
|
@doc "Get announcement"
|
||||||
@handler GetAnnouncement
|
@handler GetAnnouncement
|
||||||
get /detail (GetAnnouncementRequest) returns (Announcement)
|
get /detail (GetAnnouncementRequest) returns (Announcement)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,6 @@ type (
|
|||||||
GetAuthMethodListResponse {
|
GetAuthMethodListResponse {
|
||||||
List []AuthMethodConfig `json:"list"`
|
List []AuthMethodConfig `json:"list"`
|
||||||
}
|
}
|
||||||
|
|
||||||
TestSmsSendRequest {
|
TestSmsSendRequest {
|
||||||
AreaCode string `json:"area_code" validate:"required"`
|
AreaCode string `json:"area_code" validate:"required"`
|
||||||
Telephone string `json:"telephone" validate:"required"`
|
Telephone string `json:"telephone" validate:"required"`
|
||||||
@ -69,4 +68,5 @@ service ppanel {
|
|||||||
@doc "Get email support platform"
|
@doc "Get email support platform"
|
||||||
@handler GetEmailPlatform
|
@handler GetEmailPlatform
|
||||||
get /email_platform returns (PlatformResponse)
|
get /email_platform returns (PlatformResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -84,4 +84,5 @@ service ppanel {
|
|||||||
@doc "Query ticket wait reply"
|
@doc "Query ticket wait reply"
|
||||||
@handler QueryTicketWaitReply
|
@handler QueryTicketWaitReply
|
||||||
get /ticket returns (TicketWaitRelpyResponse)
|
get /ticket returns (TicketWaitRelpyResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -81,4 +81,5 @@ service ppanel {
|
|||||||
@doc "Get coupon list"
|
@doc "Get coupon list"
|
||||||
@handler GetCouponList
|
@handler GetCouponList
|
||||||
get /list (GetCouponListRequest) returns (GetCouponListResponse)
|
get /list (GetCouponListRequest) returns (GetCouponListResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
syntax = "v1"
|
syntax = "v1"
|
||||||
|
|
||||||
info(
|
info (
|
||||||
title: "Device API"
|
title: "Device API"
|
||||||
desc: "API for ppanel"
|
desc: "API for ppanel"
|
||||||
author: "Tension"
|
author: "Tension"
|
||||||
email: "tension@ppanel.com"
|
email: "tension@ppanel.com"
|
||||||
version: "0.0.1"
|
version: "0.0.1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -36,4 +36,5 @@ service ppanel {
|
|||||||
@doc "Get message log list"
|
@doc "Get message log list"
|
||||||
@handler GetMessageLogList
|
@handler GetMessageLogList
|
||||||
get /message/list (GetMessageLogListRequest) returns (GetMessageLogListResponse)
|
get /message/list (GetMessageLogListRequest) returns (GetMessageLogListResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -64,4 +64,5 @@ service ppanel {
|
|||||||
@doc "Update order status"
|
@doc "Update order status"
|
||||||
@handler UpdateOrderStatus
|
@handler UpdateOrderStatus
|
||||||
put /status (UpdateOrderStatusRequest)
|
put /status (UpdateOrderStatusRequest)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -77,4 +77,5 @@ service ppanel {
|
|||||||
@doc "Get supported payment platform"
|
@doc "Get supported payment platform"
|
||||||
@handler GetPaymentPlatform
|
@handler GetPaymentPlatform
|
||||||
get /platform returns (PlatformResponse)
|
get /platform returns (PlatformResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -186,4 +186,5 @@ service ppanel {
|
|||||||
@doc "Get rule group list"
|
@doc "Get rule group list"
|
||||||
@handler GetRuleGroupList
|
@handler GetRuleGroupList
|
||||||
get /rule_group_list returns (GetRuleGroupResponse)
|
get /rule_group_list returns (GetRuleGroupResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -88,13 +88,10 @@ type (
|
|||||||
GroupId int64 `form:"group_id,omitempty"`
|
GroupId int64 `form:"group_id,omitempty"`
|
||||||
Search string `form:"search,omitempty"`
|
Search string `form:"search,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
SubscribeItem {
|
SubscribeItem {
|
||||||
Subscribe
|
Subscribe
|
||||||
|
|
||||||
Sold int64 `json:"sold"`
|
Sold int64 `json:"sold"`
|
||||||
}
|
}
|
||||||
|
|
||||||
GetSubscribeListResponse {
|
GetSubscribeListResponse {
|
||||||
List []SubscribeItem `json:"list"`
|
List []SubscribeItem `json:"list"`
|
||||||
Total int64 `json:"total"`
|
Total int64 `json:"total"`
|
||||||
@ -160,4 +157,5 @@ service ppanel {
|
|||||||
@doc "Subscribe sort"
|
@doc "Subscribe sort"
|
||||||
@handler SubscribeSort
|
@handler SubscribeSort
|
||||||
post /sort (SubscribeSortRequest)
|
post /sort (SubscribeSortRequest)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -201,4 +201,5 @@ service ppanel {
|
|||||||
@doc "Update Verify Code Config"
|
@doc "Update Verify Code Config"
|
||||||
@handler UpdateVerifyCodeConfig
|
@handler UpdateVerifyCodeConfig
|
||||||
put /verify_code_config (VerifyCodeConfig)
|
put /verify_code_config (VerifyCodeConfig)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -58,4 +58,5 @@ service ppanel {
|
|||||||
@doc "Create ticket follow"
|
@doc "Create ticket follow"
|
||||||
@handler CreateTicketFollow
|
@handler CreateTicketFollow
|
||||||
post /follow (CreateTicketFollowRequest)
|
post /follow (CreateTicketFollowRequest)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
syntax = "v1"
|
syntax = "v1"
|
||||||
|
|
||||||
info(
|
info (
|
||||||
title: "Tools Api"
|
title: "Tools Api"
|
||||||
desc: "API for ppanel"
|
desc: "API for ppanel"
|
||||||
author: "Tension"
|
author: "Tension"
|
||||||
email: "tension@ppanel.com"
|
email: "tension@ppanel.com"
|
||||||
@ -21,7 +21,6 @@ type (
|
|||||||
group: admin/tool
|
group: admin/tool
|
||||||
middleware: AuthMiddleware
|
middleware: AuthMiddleware
|
||||||
)
|
)
|
||||||
|
|
||||||
service ppanel {
|
service ppanel {
|
||||||
@doc "Get System Log"
|
@doc "Get System Log"
|
||||||
@handler GetSystemLog
|
@handler GetSystemLog
|
||||||
@ -30,4 +29,5 @@ service ppanel {
|
|||||||
@doc "Restart System"
|
@doc "Restart System"
|
||||||
@handler RestartSystem
|
@handler RestartSystem
|
||||||
get /restart
|
get /restart
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -274,4 +274,5 @@ service ppanel {
|
|||||||
@doc "Get user login logs"
|
@doc "Get user login logs"
|
||||||
@handler GetUserLoginLogs
|
@handler GetUserLoginLogs
|
||||||
get /login/logs (GetUserLoginLogsRequest) returns (GetUserLoginLogsResponse)
|
get /login/logs (GetUserLoginLogsRequest) returns (GetUserLoginLogsResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -19,4 +19,5 @@ service ppanel {
|
|||||||
@doc "Query announcement"
|
@doc "Query announcement"
|
||||||
@handler QueryAnnouncement
|
@handler QueryAnnouncement
|
||||||
get /list (QueryAnnouncementRequest) returns (QueryAnnouncementResponse)
|
get /list (QueryAnnouncementRequest) returns (QueryAnnouncementResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
syntax = "v1"
|
syntax = "v1"
|
||||||
|
|
||||||
info(
|
info (
|
||||||
title: "App Auth Api"
|
title: "App Auth Api"
|
||||||
desc: "API for ppanel"
|
desc: "API for ppanel"
|
||||||
author: "Tension"
|
author: "Tension"
|
||||||
email: "tension@ppanel.com"
|
email: "tension@ppanel.com"
|
||||||
version: "0.0.1"
|
version: "0.0.1"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ type (
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@server(
|
@server (
|
||||||
prefix: v1/app/auth
|
prefix: v1/app/auth
|
||||||
group: app/auth
|
group: app/auth
|
||||||
middleware: AppMiddleware
|
middleware: AppMiddleware
|
||||||
@ -100,4 +100,5 @@ service ppanel {
|
|||||||
@doc "GetAppConfig"
|
@doc "GetAppConfig"
|
||||||
@handler GetAppConfig
|
@handler GetAppConfig
|
||||||
post /config (AppConfigRequest) returns (AppConfigResponse)
|
post /config (AppConfigRequest) returns (AppConfigResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
syntax = "v1"
|
syntax = "v1"
|
||||||
|
|
||||||
info(
|
info (
|
||||||
title: "Document API"
|
title: "Document API"
|
||||||
desc: "API for ppanel"
|
desc: "API for ppanel"
|
||||||
author: "Tension"
|
author: "Tension"
|
||||||
@ -15,7 +15,6 @@ import "../types.api"
|
|||||||
group: app/document
|
group: app/document
|
||||||
middleware: AppMiddleware,AuthMiddleware
|
middleware: AppMiddleware,AuthMiddleware
|
||||||
)
|
)
|
||||||
|
|
||||||
service ppanel {
|
service ppanel {
|
||||||
@doc "Get document list"
|
@doc "Get document list"
|
||||||
@handler QueryDocumentList
|
@handler QueryDocumentList
|
||||||
@ -24,4 +23,5 @@ service ppanel {
|
|||||||
@doc "Get document detail"
|
@doc "Get document detail"
|
||||||
@handler QueryDocumentDetail
|
@handler QueryDocumentDetail
|
||||||
get /detail (QueryDocumentDetailRequest) returns (Document)
|
get /detail (QueryDocumentDetailRequest) returns (Document)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
syntax = "v1"
|
syntax = "v1"
|
||||||
|
|
||||||
info(
|
info (
|
||||||
title: "App Node Api"
|
title: "App Node Api"
|
||||||
desc: "API for ppanel"
|
desc: "API for ppanel"
|
||||||
author: "Tension"
|
author: "Tension"
|
||||||
email: "tension@ppanel.com"
|
email: "tension@ppanel.com"
|
||||||
@ -15,11 +15,9 @@ type (
|
|||||||
Total int64 `json:"total"`
|
Total int64 `json:"total"`
|
||||||
List []ServerRuleGroup `json:"list"`
|
List []ServerRuleGroup `json:"list"`
|
||||||
}
|
}
|
||||||
|
|
||||||
AppUserSubscbribeNodeRequest {
|
AppUserSubscbribeNodeRequest {
|
||||||
Id int64 `form:"id" validate:"required"`
|
Id int64 `form:"id" validate:"required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
AppUserSubscbribeNodeResponse {
|
AppUserSubscbribeNodeResponse {
|
||||||
List []AppUserSubscbribeNode `json:"list"`
|
List []AppUserSubscbribeNode `json:"list"`
|
||||||
}
|
}
|
||||||
@ -30,15 +28,13 @@ type (
|
|||||||
group: app/node
|
group: app/node
|
||||||
middleware: AppMiddleware,AuthMiddleware
|
middleware: AppMiddleware,AuthMiddleware
|
||||||
)
|
)
|
||||||
|
|
||||||
service ppanel {
|
service ppanel {
|
||||||
|
|
||||||
@doc "Get Node list"
|
@doc "Get Node list"
|
||||||
@handler GetNodeList
|
@handler GetNodeList
|
||||||
get /list (AppUserSubscbribeNodeRequest) returns(AppUserSubscbribeNodeResponse)
|
get /list (AppUserSubscbribeNodeRequest) returns (AppUserSubscbribeNodeResponse)
|
||||||
|
|
||||||
@doc "Get rule group list"
|
@doc "Get rule group list"
|
||||||
@handler GetRuleGroupList
|
@handler GetRuleGroupList
|
||||||
get /rule_group_list returns (AppRuleGroupListResponse)
|
get /rule_group_list returns (AppRuleGroupListResponse)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
@ -53,4 +53,5 @@ service ppanel {
|
|||||||
@doc "Get order list"
|
@doc "Get order list"
|
||||||
@handler QueryOrderList
|
@handler QueryOrderList
|
||||||
get /list (QueryOrderListRequest) returns (QueryOrderListResponse)
|
get /list (QueryOrderListRequest) returns (QueryOrderListResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -19,4 +19,5 @@ service ppanel {
|
|||||||
@doc "Get available payment methods"
|
@doc "Get available payment methods"
|
||||||
@handler GetAvailablePaymentMethods
|
@handler GetAvailablePaymentMethods
|
||||||
get /methods returns (GetAvailablePaymentMethodsResponse)
|
get /methods returns (GetAvailablePaymentMethodsResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
syntax = "v1"
|
syntax = "v1"
|
||||||
|
|
||||||
info(
|
info (
|
||||||
title: "Subscribe API"
|
title: "Subscribe API"
|
||||||
desc: "API for ppanel"
|
desc: "API for ppanel"
|
||||||
author: "Tension"
|
author: "Tension"
|
||||||
email: "tension@ppanel.com"
|
email: "tension@ppanel.com"
|
||||||
version: "0.0.1"
|
version: "0.0.1"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -14,35 +14,29 @@ type (
|
|||||||
QueryUserSubscribeResp {
|
QueryUserSubscribeResp {
|
||||||
Data []UserSubscribeData `json:"data"`
|
Data []UserSubscribeData `json:"data"`
|
||||||
}
|
}
|
||||||
|
|
||||||
UserSubscribeData {
|
UserSubscribeData {
|
||||||
SubscribeId int64 `json:"subscribe_id"`
|
SubscribeId int64 `json:"subscribe_id"`
|
||||||
UserSubscribeId int64 `json:"user_subscribe_id"`
|
UserSubscribeId int64 `json:"user_subscribe_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
UserSubscribeResetPeriodRequest {
|
UserSubscribeResetPeriodRequest {
|
||||||
UserSubscribeId int64 `json:"user_subscribe_id"`
|
UserSubscribeId int64 `json:"user_subscribe_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
UserSubscribeResetPeriodResponse {
|
UserSubscribeResetPeriodResponse {
|
||||||
Status bool `json:"status"`
|
Status bool `json:"status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
AppUserSubscribeRequest {
|
AppUserSubscribeRequest {
|
||||||
ContainsNodes *bool `form:"contains_nodes"`
|
ContainsNodes *bool `form:"contains_nodes"`
|
||||||
}
|
}
|
||||||
|
|
||||||
AppUserSubscbribeResponse {
|
AppUserSubscbribeResponse {
|
||||||
List []AppUserSubcbribe `json:"list"`
|
List []AppUserSubcbribe `json:"list"`
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@server(
|
@server (
|
||||||
prefix: v1/app/subscribe
|
prefix: v1/app/subscribe
|
||||||
group: app/subscribe
|
group: app/subscribe
|
||||||
middleware: AppMiddleware,AuthMiddleware
|
middleware: AppMiddleware,AuthMiddleware
|
||||||
)
|
)
|
||||||
|
|
||||||
service ppanel {
|
service ppanel {
|
||||||
@doc "Get subscribe list"
|
@doc "Get subscribe list"
|
||||||
@handler QuerySubscribeList
|
@handler QuerySubscribeList
|
||||||
@ -67,4 +61,5 @@ service ppanel {
|
|||||||
@doc "Reset user subscription period"
|
@doc "Reset user subscription period"
|
||||||
@handler ResetUserSubscribePeriod
|
@handler ResetUserSubscribePeriod
|
||||||
post /reset/period (UserSubscribeResetPeriodRequest) returns (UserSubscribeResetPeriodResponse)
|
post /reset/period (UserSubscribeResetPeriodRequest) returns (UserSubscribeResetPeriodResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -33,12 +33,10 @@ type (
|
|||||||
Method string `json:"method" validate:"required" validate:"required,oneof=email telephone device"`
|
Method string `json:"method" validate:"required" validate:"required,oneof=email telephone device"`
|
||||||
Code string `json:"code"`
|
Code string `json:"code"`
|
||||||
}
|
}
|
||||||
|
|
||||||
GetUserOnlineTimeStatisticsResponse {
|
GetUserOnlineTimeStatisticsResponse {
|
||||||
WeeklyStats []WeeklyStat `json:"weekly_stats"`
|
WeeklyStats []WeeklyStat `json:"weekly_stats"`
|
||||||
ConnectionRecords ConnectionRecords `json:"connection_records"`
|
ConnectionRecords ConnectionRecords `json:"connection_records"`
|
||||||
}
|
}
|
||||||
|
|
||||||
WeeklyStat {
|
WeeklyStat {
|
||||||
Day int `json:"day"`
|
Day int `json:"day"`
|
||||||
DayName string `json:"day_name"`
|
DayName string `json:"day_name"`
|
||||||
@ -84,5 +82,5 @@ service ppanel {
|
|||||||
@doc "Query User Affiliate Count"
|
@doc "Query User Affiliate Count"
|
||||||
@handler QueryUserAffiliate
|
@handler QueryUserAffiliate
|
||||||
get /affiliate/count returns (QueryUserAffiliateCountResponse)
|
get /affiliate/count returns (QueryUserAffiliateCountResponse)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,21 +1,21 @@
|
|||||||
syntax = "v1"
|
syntax = "v1"
|
||||||
|
|
||||||
info(
|
info (
|
||||||
title: "App Heartbeat Api"
|
title: "App Heartbeat Api"
|
||||||
desc: "API for ppanel"
|
desc: "API for ppanel"
|
||||||
author: "Tension"
|
author: "Tension"
|
||||||
email: "tension@ppanel.com"
|
email: "tension@ppanel.com"
|
||||||
version: "0.0.1"
|
version: "0.0.1"
|
||||||
)
|
)
|
||||||
|
|
||||||
@server(
|
@server (
|
||||||
prefix: v1/app/ws
|
prefix: v1/app/ws
|
||||||
group: app/ws
|
group: app/ws
|
||||||
middleware: AuthMiddleware
|
middleware: AuthMiddleware
|
||||||
)
|
)
|
||||||
|
|
||||||
service ppanel {
|
service ppanel {
|
||||||
@doc "App heartbeat"
|
@doc "App heartbeat"
|
||||||
@handler AppWs
|
@handler AppWs
|
||||||
get /:userid/:identifier
|
get /:userid/:identifier
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -54,12 +54,10 @@ type (
|
|||||||
OAuthLoginResponse {
|
OAuthLoginResponse {
|
||||||
Redirect string `json:"redirect"`
|
Redirect string `json:"redirect"`
|
||||||
}
|
}
|
||||||
|
|
||||||
OAuthLoginGetTokenRequest {
|
OAuthLoginGetTokenRequest {
|
||||||
Method string `json:"method" validate:"required"` // google, facebook, apple, telegram, github etc.
|
Method string `json:"method" validate:"required"` // google, facebook, apple, telegram, github etc.
|
||||||
Callback interface{} `json:"callback" validate:"required"`
|
Callback interface{} `json:"callback" validate:"required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// login request
|
// login request
|
||||||
TelephoneLoginRequest {
|
TelephoneLoginRequest {
|
||||||
Telephone string `json:"telephone" validate:"required"`
|
Telephone string `json:"telephone" validate:"required"`
|
||||||
@ -162,4 +160,5 @@ service ppanel {
|
|||||||
@doc "Apple Login Callback"
|
@doc "Apple Login Callback"
|
||||||
@handler AppleLoginCallback
|
@handler AppleLoginCallback
|
||||||
post /callback/apple (AppleLoginCallbackRequest)
|
post /callback/apple (AppleLoginCallbackRequest)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -75,7 +75,6 @@ type (
|
|||||||
Code string `json:"code" validate:"required"`
|
Code string `json:"code" validate:"required"`
|
||||||
Type uint8 `json:"type" validate:"required"`
|
Type uint8 `json:"type" validate:"required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckVerificationCodeRespone {
|
CheckVerificationCodeRespone {
|
||||||
Status bool `json:"status"`
|
Status bool `json:"status"`
|
||||||
}
|
}
|
||||||
@ -121,4 +120,5 @@ service ppanel {
|
|||||||
@doc "Check verification code"
|
@doc "Check verification code"
|
||||||
@handler CheckVerificationCode
|
@handler CheckVerificationCode
|
||||||
post /check_verification_code (CheckVerificationCodeRequest) returns (CheckVerificationCodeRespone)
|
post /check_verification_code (CheckVerificationCodeRequest) returns (CheckVerificationCodeRespone)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -78,7 +78,6 @@ type (
|
|||||||
ServerCommon
|
ServerCommon
|
||||||
Traffic []UserTraffic `json:"traffic"`
|
Traffic []UserTraffic `json:"traffic"`
|
||||||
}
|
}
|
||||||
|
|
||||||
ServerPushStatusRequest {
|
ServerPushStatusRequest {
|
||||||
ServerCommon
|
ServerCommon
|
||||||
Cpu float64 `json:"cpu"`
|
Cpu float64 `json:"cpu"`
|
||||||
@ -93,8 +92,8 @@ type (
|
|||||||
)
|
)
|
||||||
|
|
||||||
@server (
|
@server (
|
||||||
prefix: v1/server
|
prefix: v1/server
|
||||||
group: server
|
group: server
|
||||||
middleware: ServerMiddleware
|
middleware: ServerMiddleware
|
||||||
)
|
)
|
||||||
service ppanel {
|
service ppanel {
|
||||||
@ -117,4 +116,5 @@ service ppanel {
|
|||||||
@doc "Push online users"
|
@doc "Push online users"
|
||||||
@handler PushOnlineUsers
|
@handler PushOnlineUsers
|
||||||
post /online (OnlineUsersRequest)
|
post /online (OnlineUsersRequest)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -19,4 +19,5 @@ service ppanel {
|
|||||||
@doc "Query announcement"
|
@doc "Query announcement"
|
||||||
@handler QueryAnnouncement
|
@handler QueryAnnouncement
|
||||||
get /list (QueryAnnouncementRequest) returns (QueryAnnouncementResponse)
|
get /list (QueryAnnouncementRequest) returns (QueryAnnouncementResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
syntax = "v1"
|
syntax = "v1"
|
||||||
|
|
||||||
info(
|
info (
|
||||||
title: "Document API"
|
title: "Document API"
|
||||||
desc: "API for ppanel"
|
desc: "API for ppanel"
|
||||||
author: "Tension"
|
author: "Tension"
|
||||||
@ -15,7 +15,6 @@ import "../types.api"
|
|||||||
group: public/document
|
group: public/document
|
||||||
middleware: AuthMiddleware
|
middleware: AuthMiddleware
|
||||||
)
|
)
|
||||||
|
|
||||||
service ppanel {
|
service ppanel {
|
||||||
@doc "Get document list"
|
@doc "Get document list"
|
||||||
@handler QueryDocumentList
|
@handler QueryDocumentList
|
||||||
@ -24,4 +23,5 @@ service ppanel {
|
|||||||
@doc "Get document detail"
|
@doc "Get document detail"
|
||||||
@handler QueryDocumentDetail
|
@handler QueryDocumentDetail
|
||||||
get /detail (QueryDocumentDetailRequest) returns (Document)
|
get /detail (QueryDocumentDetailRequest) returns (Document)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -47,4 +47,5 @@ service ppanel {
|
|||||||
@doc "Get order list"
|
@doc "Get order list"
|
||||||
@handler QueryOrderList
|
@handler QueryOrderList
|
||||||
get /list (QueryOrderListRequest) returns (QueryOrderListResponse)
|
get /list (QueryOrderListRequest) returns (QueryOrderListResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -19,4 +19,5 @@ service ppanel {
|
|||||||
@doc "Get available payment methods"
|
@doc "Get available payment methods"
|
||||||
@handler GetAvailablePaymentMethods
|
@handler GetAvailablePaymentMethods
|
||||||
get /methods returns (GetAvailablePaymentMethodsResponse)
|
get /methods returns (GetAvailablePaymentMethodsResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -92,4 +92,5 @@ service ppanel {
|
|||||||
@doc "Purchase Checkout"
|
@doc "Purchase Checkout"
|
||||||
@handler PurchaseCheckout
|
@handler PurchaseCheckout
|
||||||
post /order/checkout (CheckoutOrderRequest) returns (CheckoutOrderResponse)
|
post /order/checkout (CheckoutOrderRequest) returns (CheckoutOrderResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -27,4 +27,5 @@ service ppanel {
|
|||||||
@doc "Get application config"
|
@doc "Get application config"
|
||||||
@handler QueryApplicationConfig
|
@handler QueryApplicationConfig
|
||||||
get /application/config returns (ApplicationResponse)
|
get /application/config returns (ApplicationResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -65,4 +65,5 @@ service ppanel {
|
|||||||
@doc "Create ticket"
|
@doc "Create ticket"
|
||||||
@handler CreateUserTicket
|
@handler CreateUserTicket
|
||||||
post / (CreateUserTicketRequest)
|
post / (CreateUserTicketRequest)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -28,7 +28,6 @@ type (
|
|||||||
List []UserBalanceLog `json:"list"`
|
List []UserBalanceLog `json:"list"`
|
||||||
Total int64 `json:"total"`
|
Total int64 `json:"total"`
|
||||||
}
|
}
|
||||||
|
|
||||||
CommissionLog {
|
CommissionLog {
|
||||||
Id int64 `json:"id"`
|
Id int64 `json:"id"`
|
||||||
UserId int64 `json:"user_id"`
|
UserId int64 `json:"user_id"`
|
||||||
@ -77,37 +76,30 @@ type (
|
|||||||
ResetUserSubscribeTokenRequest {
|
ResetUserSubscribeTokenRequest {
|
||||||
UserSubscribeId int64 `json:"user_subscribe_id"`
|
UserSubscribeId int64 `json:"user_subscribe_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
GetLoginLogRequest {
|
GetLoginLogRequest {
|
||||||
Page int `form:"page"`
|
Page int `form:"page"`
|
||||||
Size int `form:"size"`
|
Size int `form:"size"`
|
||||||
}
|
}
|
||||||
|
|
||||||
GetLoginLogResponse {
|
GetLoginLogResponse {
|
||||||
List []UserLoginLog `json:"list"`
|
List []UserLoginLog `json:"list"`
|
||||||
Total int64 `json:"total"`
|
Total int64 `json:"total"`
|
||||||
}
|
}
|
||||||
|
|
||||||
GetSubscribeLogRequest {
|
GetSubscribeLogRequest {
|
||||||
Page int `form:"page"`
|
Page int `form:"page"`
|
||||||
Size int `form:"size"`
|
Size int `form:"size"`
|
||||||
}
|
}
|
||||||
|
|
||||||
GetSubscribeLogResponse {
|
GetSubscribeLogResponse {
|
||||||
List []UserSubscribeLog `json:"list"`
|
List []UserSubscribeLog `json:"list"`
|
||||||
Total int64 `json:"total"`
|
Total int64 `json:"total"`
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateBindMobileRequest {
|
UpdateBindMobileRequest {
|
||||||
AreaCode string `json:"area_code" validate:"required"`
|
AreaCode string `json:"area_code" validate:"required"`
|
||||||
Mobile string `json:"mobile" validate:"required"`
|
Mobile string `json:"mobile" validate:"required"`
|
||||||
Code string `json:"code" validate:"required"`
|
Code string `json:"code" validate:"required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateBindEmailRequest {
|
UpdateBindEmailRequest {
|
||||||
Email string `json:"email" validate:"required"`
|
Email string `json:"email" validate:"required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
VerifyEmailRequest {
|
VerifyEmailRequest {
|
||||||
Email string `json:"email" validate:"required"`
|
Email string `json:"email" validate:"required"`
|
||||||
Code string `json:"code" validate:"required"`
|
Code string `json:"code" validate:"required"`
|
||||||
@ -207,4 +199,5 @@ service ppanel {
|
|||||||
@doc "Update Bind Email"
|
@doc "Update Bind Email"
|
||||||
@handler UpdateBindEmail
|
@handler UpdateBindEmail
|
||||||
put /bind_email (UpdateBindEmailRequest)
|
put /bind_email (UpdateBindEmailRequest)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,26 +1,28 @@
|
|||||||
syntax = "v1"
|
syntax = "v1"
|
||||||
|
|
||||||
info(
|
info (
|
||||||
title: "admin API"
|
title: "admin API"
|
||||||
desc: "API for ppanel"
|
desc: "API for ppanel"
|
||||||
author: "Tension"
|
author: "Tension"
|
||||||
email: "tension@ppanel.com"
|
email: "tension@ppanel.com"
|
||||||
version: "0.0.1"
|
version: "0.0.1"
|
||||||
)
|
)
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"./admin/system.api"
|
"./admin/system.api"
|
||||||
"./admin/user.api"
|
"./admin/user.api"
|
||||||
"./admin/server.api"
|
"./admin/server.api"
|
||||||
"./admin/subscribe.api"
|
"./admin/subscribe.api"
|
||||||
"./admin/payment.api"
|
"./admin/payment.api"
|
||||||
"./admin/coupon.api"
|
"./admin/coupon.api"
|
||||||
"./admin/order.api"
|
"./admin/order.api"
|
||||||
"./admin/ticket.api"
|
"./admin/ticket.api"
|
||||||
"./admin/announcement.api"
|
"./admin/announcement.api"
|
||||||
"./admin/document.api"
|
"./admin/document.api"
|
||||||
"./admin/tool.api"
|
"./admin/tool.api"
|
||||||
"./admin/console.api"
|
"./admin/console.api"
|
||||||
"./admin/auth.api"
|
"./admin/auth.api"
|
||||||
"./admin/log.api"
|
"./admin/log.api"
|
||||||
"./admin/ads.api"
|
"./admin/ads.api"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
syntax = "v1"
|
syntax = "v1"
|
||||||
|
|
||||||
info(
|
info (
|
||||||
title: "App API"
|
title: "App API"
|
||||||
desc: "API for ppanel"
|
desc: "API for ppanel"
|
||||||
author: "Tension"
|
author: "Tension"
|
||||||
@ -18,4 +18,5 @@ import (
|
|||||||
"./app/payment.api"
|
"./app/payment.api"
|
||||||
"./app/document.api"
|
"./app/document.api"
|
||||||
"./app/subscribe.api"
|
"./app/subscribe.api"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
syntax = "v1"
|
syntax = "v1"
|
||||||
|
|
||||||
info(
|
info (
|
||||||
title: "common API"
|
title: "common API"
|
||||||
desc: "API for ppanel"
|
desc: "API for ppanel"
|
||||||
author: "Tension"
|
author: "Tension"
|
||||||
@ -11,4 +11,5 @@ info(
|
|||||||
import (
|
import (
|
||||||
"./common.api"
|
"./common.api"
|
||||||
"./auth/auth.api"
|
"./auth/auth.api"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
syntax = "v1"
|
syntax = "v1"
|
||||||
|
|
||||||
info(
|
info (
|
||||||
title: "Node API"
|
title: "Node API"
|
||||||
desc: "API for ppanel"
|
desc: "API for ppanel"
|
||||||
author: "Tension"
|
author: "Tension"
|
||||||
@ -8,4 +8,4 @@ info(
|
|||||||
version: "0.0.1"
|
version: "0.0.1"
|
||||||
)
|
)
|
||||||
|
|
||||||
import "./node/node.api"
|
import "./node/node.api"
|
||||||
|
|||||||
@ -1,12 +1,13 @@
|
|||||||
syntax = "v1"
|
syntax = "v1"
|
||||||
|
|
||||||
info(
|
info (
|
||||||
title: "User API"
|
title: "User API"
|
||||||
desc: "API for ppanel"
|
desc: "API for ppanel"
|
||||||
author: "Tension"
|
author: "Tension"
|
||||||
email: "tension@ppanel.com"
|
email: "tension@ppanel.com"
|
||||||
version: "0.0.1"
|
version: "0.0.1"
|
||||||
)
|
)
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"./public/user.api"
|
"./public/user.api"
|
||||||
"./public/subscribe.api"
|
"./public/subscribe.api"
|
||||||
@ -16,4 +17,5 @@ import (
|
|||||||
"./public/payment.api"
|
"./public/payment.api"
|
||||||
"./public/document.api"
|
"./public/document.api"
|
||||||
"./public/portal.api"
|
"./public/portal.api"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -246,11 +246,15 @@ type (
|
|||||||
SecurityConfig SecurityConfig `json:"security_config"`
|
SecurityConfig SecurityConfig `json:"security_config"`
|
||||||
}
|
}
|
||||||
Tuic {
|
Tuic {
|
||||||
|
Port int `json:"port" validate:"required"`
|
||||||
|
DisableSNI bool `json:"disable_sni"`
|
||||||
|
ReduceRtt bool `json:"reduce_rtt"`
|
||||||
|
UDPRelayMode string `json:"udp_relay_mode"`
|
||||||
|
CongestionController string `json:"congestion_controller"`
|
||||||
|
SecurityConfig SecurityConfig `json:"security_config"`
|
||||||
|
}
|
||||||
|
AnyTLS {
|
||||||
Port int `json:"port" validate:"required"`
|
Port int `json:"port" validate:"required"`
|
||||||
DisableSNI bool `json:"disable_sni"`
|
|
||||||
ReduceRtt bool `json:"reduce_rtt"`
|
|
||||||
UDPRelayMode string `json:"udp_relay_mode"`
|
|
||||||
CongestionController string `json:"congestion_controller"`
|
|
||||||
SecurityConfig SecurityConfig `json:"security_config"`
|
SecurityConfig SecurityConfig `json:"security_config"`
|
||||||
}
|
}
|
||||||
SecurityConfig {
|
SecurityConfig {
|
||||||
@ -711,12 +715,10 @@ type (
|
|||||||
Telephone string `json:"telephone"`
|
Telephone string `json:"telephone"`
|
||||||
Address string `json:"address"`
|
Address string `json:"address"`
|
||||||
}
|
}
|
||||||
|
|
||||||
QueryUserAffiliateCountResponse {
|
QueryUserAffiliateCountResponse {
|
||||||
Registers int64 `json:"registers"`
|
Registers int64 `json:"registers"`
|
||||||
TotalCommission int64 `json:"total_commission"`
|
TotalCommission int64 `json:"total_commission"`
|
||||||
}
|
}
|
||||||
|
|
||||||
AppUserSubcbribe {
|
AppUserSubcbribe {
|
||||||
Id int64 `json:"id"`
|
Id int64 `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
@ -728,7 +730,6 @@ type (
|
|||||||
ExpireTime string `json:"expire_time"`
|
ExpireTime string `json:"expire_time"`
|
||||||
List []AppUserSubscbribeNode `json:"list"`
|
List []AppUserSubscbribeNode `json:"list"`
|
||||||
}
|
}
|
||||||
|
|
||||||
AppUserSubscbribeNode {
|
AppUserSubscbribeNode {
|
||||||
Id int64 `json:"id"`
|
Id int64 `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
@ -750,4 +751,5 @@ type (
|
|||||||
CreatedAt int64 `json:"created_at"`
|
CreatedAt int64 `json:"created_at"`
|
||||||
Download int64 `json:"download"`
|
Download int64 `json:"download"`
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user