style(api): standardize formatting and remove trailing newlines in API definitions
This commit is contained in:
+1
-2
@@ -75,5 +75,4 @@ service ppanel {
|
||||
@doc "Get Ads Detail"
|
||||
@handler GetAdsDetail
|
||||
get /detail (GetAdsDetailRequest) returns (Ads)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -72,5 +72,4 @@ service ppanel {
|
||||
@doc "Get announcement"
|
||||
@handler GetAnnouncement
|
||||
get /detail (GetAnnouncementRequest) returns (Announcement)
|
||||
}
|
||||
|
||||
}
|
||||
+2
-6
@@ -26,16 +26,14 @@ type (
|
||||
List []AuthMethodConfig `json:"list"`
|
||||
}
|
||||
|
||||
|
||||
TestSmsSendRequest {
|
||||
AreaCode string `json:"area_code" validate:"required"`
|
||||
AreaCode string `json:"area_code" validate:"required"`
|
||||
Telephone string `json:"telephone" validate:"required"`
|
||||
}
|
||||
// Test email smtp request
|
||||
TestEmailSendRequest {
|
||||
Email string `json:"email" validate:"required"`
|
||||
}
|
||||
|
||||
)
|
||||
|
||||
@server (
|
||||
@@ -56,7 +54,6 @@ service ppanel {
|
||||
@handler UpdateAuthMethodConfig
|
||||
put /config (UpdateAuthMethodConfigRequest) returns (AuthMethodConfig)
|
||||
|
||||
|
||||
@doc "Test sms send"
|
||||
@handler TestSmsSend
|
||||
post /test_sms_send (TestSmsSendRequest)
|
||||
@@ -72,5 +69,4 @@ service ppanel {
|
||||
@doc "Get email support platform"
|
||||
@handler GetEmailPlatform
|
||||
get /email_platform returns (PlatformResponse)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -84,5 +84,4 @@ service ppanel {
|
||||
@doc "Query ticket wait reply"
|
||||
@handler QueryTicketWaitReply
|
||||
get /ticket returns (TicketWaitRelpyResponse)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -21,8 +21,8 @@ type (
|
||||
ExpireTime int64 `json:"expire_time" validate:"required"`
|
||||
UserLimit int64 `json:"user_limit,omitempty"`
|
||||
Subscribe []int64 `json:"subscribe,omitempty"`
|
||||
UsedCount int64 `json:"used_count,omitempty"`
|
||||
Enable *bool `json:"enable,omitempty"`
|
||||
UsedCount int64 `json:"used_count,omitempty"`
|
||||
Enable *bool `json:"enable,omitempty"`
|
||||
}
|
||||
UpdateCouponRequest {
|
||||
Id int64 `json:"id" validate:"required"`
|
||||
@@ -35,8 +35,8 @@ type (
|
||||
ExpireTime int64 `json:"expire_time" validate:"required"`
|
||||
UserLimit int64 `json:"user_limit,omitempty"`
|
||||
Subscribe []int64 `json:"subscribe,omitempty"`
|
||||
UsedCount int64 `json:"used_count,omitempty"`
|
||||
Enable *bool `json:"enable,omitempty"`
|
||||
UsedCount int64 `json:"used_count,omitempty"`
|
||||
Enable *bool `json:"enable,omitempty"`
|
||||
}
|
||||
DeleteCouponRequest {
|
||||
Id int64 `json:"id" validate:"required"`
|
||||
@@ -81,5 +81,4 @@ service ppanel {
|
||||
@doc "Get coupon list"
|
||||
@handler GetCouponList
|
||||
get /list (GetCouponListRequest) returns (GetCouponListResponse)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,13 +1,9 @@
|
||||
syntax = "v1"
|
||||
|
||||
info(
|
||||
title: "Device API"
|
||||
desc: "API for ppanel"
|
||||
author: "Tension"
|
||||
email: "tension@ppanel.com"
|
||||
version: "0.0.1"
|
||||
)
|
||||
|
||||
type (
|
||||
|
||||
title: "Device API"
|
||||
desc: "API for ppanel"
|
||||
author: "Tension"
|
||||
email: "tension@ppanel.com"
|
||||
version: "0.0.1"
|
||||
)
|
||||
+1
-2
@@ -36,5 +36,4 @@ service ppanel {
|
||||
@doc "Get message log list"
|
||||
@handler GetMessageLogList
|
||||
get /message/list (GetMessageLogListRequest) returns (GetMessageLogListResponse)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -64,5 +64,4 @@ service ppanel {
|
||||
@doc "Update order status"
|
||||
@handler UpdateOrderStatus
|
||||
put /status (UpdateOrderStatusRequest)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -77,5 +77,4 @@ service ppanel {
|
||||
@doc "Get supported payment platform"
|
||||
@handler GetPaymentPlatform
|
||||
get /platform returns (PlatformResponse)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -14,7 +14,7 @@ type (
|
||||
GetNodeServerListRequest {
|
||||
Page int `form:"page" validate:"required"`
|
||||
Size int `form:"size" validate:"required"`
|
||||
Tags string `form:"tags,omitempty"`
|
||||
Tags string `form:"tags,omitempty"`
|
||||
GroupId int64 `form:"group_id,omitempty"`
|
||||
Search string `form:"search,omitempty"`
|
||||
}
|
||||
@@ -88,14 +88,14 @@ type (
|
||||
}
|
||||
CreateRuleGroupRequest {
|
||||
Name string `json:"name" validate:"required"`
|
||||
Icon string `json:"icon"`
|
||||
Icon string `json:"icon"`
|
||||
Tags []string `json:"tags"`
|
||||
Rules string `json:"rules"`
|
||||
Enable bool `json:"enable"`
|
||||
}
|
||||
UpdateRuleGroupRequest {
|
||||
Id int64 `json:"id" validate:"required"`
|
||||
Icon string `json:"icon"`
|
||||
Icon string `json:"icon"`
|
||||
Name string `json:"name" validate:"required"`
|
||||
Tags []string `json:"tags"`
|
||||
Rules string `json:"rules"`
|
||||
@@ -186,5 +186,4 @@ service ppanel {
|
||||
@doc "Get rule group list"
|
||||
@handler GetRuleGroupList
|
||||
get /rule_group_list returns (GetRuleGroupResponse)
|
||||
}
|
||||
|
||||
}
|
||||
+46
-47
@@ -34,50 +34,50 @@ type (
|
||||
Ids []int64 `json:"ids" validate:"required"`
|
||||
}
|
||||
CreateSubscribeRequest {
|
||||
Name string `json:"name" validate:"required"`
|
||||
Description string `json:"description"`
|
||||
UnitPrice int64 `json:"unit_price"`
|
||||
UnitTime string `json:"unit_time"`
|
||||
Discount []SubscribeDiscount `json:"discount"`
|
||||
Replacement int64 `json:"replacement"`
|
||||
Inventory int64 `json:"inventory"`
|
||||
Traffic int64 `json:"traffic"`
|
||||
SpeedLimit int64 `json:"speed_limit"`
|
||||
DeviceLimit int64 `json:"device_limit"`
|
||||
Quota int64 `json:"quota"`
|
||||
GroupId int64 `json:"group_id"`
|
||||
ServerGroup []int64 `json:"server_group"`
|
||||
Server []int64 `json:"server"`
|
||||
Show *bool `json:"show"`
|
||||
Sell *bool `json:"sell"`
|
||||
DeductionRatio int64 `json:"deduction_ratio"`
|
||||
AllowDeduction *bool `json:"allow_deduction"`
|
||||
ResetCycle int64 `json:"reset_cycle"`
|
||||
RenewalReset *bool `json:"renewal_reset"`
|
||||
Name string `json:"name" validate:"required"`
|
||||
Description string `json:"description"`
|
||||
UnitPrice int64 `json:"unit_price"`
|
||||
UnitTime string `json:"unit_time"`
|
||||
Discount []SubscribeDiscount `json:"discount"`
|
||||
Replacement int64 `json:"replacement"`
|
||||
Inventory int64 `json:"inventory"`
|
||||
Traffic int64 `json:"traffic"`
|
||||
SpeedLimit int64 `json:"speed_limit"`
|
||||
DeviceLimit int64 `json:"device_limit"`
|
||||
Quota int64 `json:"quota"`
|
||||
GroupId int64 `json:"group_id"`
|
||||
ServerGroup []int64 `json:"server_group"`
|
||||
Server []int64 `json:"server"`
|
||||
Show *bool `json:"show"`
|
||||
Sell *bool `json:"sell"`
|
||||
DeductionRatio int64 `json:"deduction_ratio"`
|
||||
AllowDeduction *bool `json:"allow_deduction"`
|
||||
ResetCycle int64 `json:"reset_cycle"`
|
||||
RenewalReset *bool `json:"renewal_reset"`
|
||||
}
|
||||
UpdateSubscribeRequest {
|
||||
Id int64 `json:"id" validate:"required"`
|
||||
Name string `json:"name" validate:"required"`
|
||||
Description string `json:"description"`
|
||||
UnitPrice int64 `json:"unit_price"`
|
||||
UnitTime string `json:"unit_time"`
|
||||
Discount []SubscribeDiscount `json:"discount"`
|
||||
Replacement int64 `json:"replacement"`
|
||||
Inventory int64 `json:"inventory"`
|
||||
Traffic int64 `json:"traffic"`
|
||||
SpeedLimit int64 `json:"speed_limit"`
|
||||
DeviceLimit int64 `json:"device_limit"`
|
||||
Quota int64 `json:"quota"`
|
||||
GroupId int64 `json:"group_id"`
|
||||
ServerGroup []int64 `json:"server_group"`
|
||||
Server []int64 `json:"server"`
|
||||
Show *bool `json:"show"`
|
||||
Sell *bool `json:"sell"`
|
||||
Sort int64 `json:"sort"`
|
||||
DeductionRatio int64 `json:"deduction_ratio"`
|
||||
AllowDeduction *bool `json:"allow_deduction"`
|
||||
ResetCycle int64 `json:"reset_cycle"`
|
||||
RenewalReset *bool `json:"renewal_reset"`
|
||||
Id int64 `json:"id" validate:"required"`
|
||||
Name string `json:"name" validate:"required"`
|
||||
Description string `json:"description"`
|
||||
UnitPrice int64 `json:"unit_price"`
|
||||
UnitTime string `json:"unit_time"`
|
||||
Discount []SubscribeDiscount `json:"discount"`
|
||||
Replacement int64 `json:"replacement"`
|
||||
Inventory int64 `json:"inventory"`
|
||||
Traffic int64 `json:"traffic"`
|
||||
SpeedLimit int64 `json:"speed_limit"`
|
||||
DeviceLimit int64 `json:"device_limit"`
|
||||
Quota int64 `json:"quota"`
|
||||
GroupId int64 `json:"group_id"`
|
||||
ServerGroup []int64 `json:"server_group"`
|
||||
Server []int64 `json:"server"`
|
||||
Show *bool `json:"show"`
|
||||
Sell *bool `json:"sell"`
|
||||
Sort int64 `json:"sort"`
|
||||
DeductionRatio int64 `json:"deduction_ratio"`
|
||||
AllowDeduction *bool `json:"allow_deduction"`
|
||||
ResetCycle int64 `json:"reset_cycle"`
|
||||
RenewalReset *bool `json:"renewal_reset"`
|
||||
}
|
||||
SubscribeSortRequest {
|
||||
Sort []SortItem `json:"sort"`
|
||||
@@ -90,14 +90,14 @@ type (
|
||||
}
|
||||
|
||||
SubscribeItem {
|
||||
Subscribe
|
||||
Subscribe
|
||||
|
||||
Sold int64 `json:"sold"`
|
||||
Sold int64 `json:"sold"`
|
||||
}
|
||||
|
||||
GetSubscribeListResponse {
|
||||
List []SubscribeItem `json:"list"`
|
||||
Total int64 `json:"total"`
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
DeleteSubscribeRequest {
|
||||
Id int64 `json:"id" validate:"required"`
|
||||
@@ -160,5 +160,4 @@ service ppanel {
|
||||
@doc "Subscribe sort"
|
||||
@handler SubscribeSort
|
||||
post /sort (SubscribeSortRequest)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -201,5 +201,4 @@ service ppanel {
|
||||
@doc "Update Verify Code Config"
|
||||
@handler UpdateVerifyCodeConfig
|
||||
put /verify_code_config (VerifyCodeConfig)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -12,14 +12,14 @@ import "../types.api"
|
||||
|
||||
type (
|
||||
UpdateTicketStatusRequest {
|
||||
Id int64 `json:"id" validate:"required"`
|
||||
Id int64 `json:"id" validate:"required"`
|
||||
Status *uint8 `json:"status" validate:"required"`
|
||||
}
|
||||
GetTicketListRequest {
|
||||
Page int64 `form:"page"`
|
||||
Size int64 `form:"size"`
|
||||
UserId int64 `form:"user_id,omitempty"`
|
||||
Status *uint8 `form:"status,omitempty"`
|
||||
Status *uint8 `form:"status,omitempty"`
|
||||
Search string `form:"search,omitempty"`
|
||||
}
|
||||
GetTicketListResponse {
|
||||
@@ -58,5 +58,4 @@ service ppanel {
|
||||
@doc "Create ticket follow"
|
||||
@handler CreateTicketFollow
|
||||
post /follow (CreateTicketFollowRequest)
|
||||
}
|
||||
|
||||
}
|
||||
+18
-18
@@ -1,33 +1,33 @@
|
||||
syntax = "v1"
|
||||
|
||||
info(
|
||||
title: "Tools Api"
|
||||
desc: "API for ppanel"
|
||||
author: "Tension"
|
||||
email: "tension@ppanel.com"
|
||||
version: "0.0.1"
|
||||
title: "Tools Api"
|
||||
desc: "API for ppanel"
|
||||
author: "Tension"
|
||||
email: "tension@ppanel.com"
|
||||
version: "0.0.1"
|
||||
)
|
||||
|
||||
import "../types.api"
|
||||
|
||||
type (
|
||||
LogResponse {
|
||||
List interface{} `json:"list"`
|
||||
}
|
||||
LogResponse {
|
||||
List interface{} `json:"list"`
|
||||
}
|
||||
)
|
||||
|
||||
@server (
|
||||
prefix: v1/admin/tool
|
||||
group: admin/tool
|
||||
middleware: AuthMiddleware
|
||||
prefix: v1/admin/tool
|
||||
group: admin/tool
|
||||
middleware: AuthMiddleware
|
||||
)
|
||||
|
||||
service ppanel {
|
||||
@doc "Get System Log"
|
||||
@handler GetSystemLog
|
||||
get /log returns (LogResponse)
|
||||
@doc "Get System Log"
|
||||
@handler GetSystemLog
|
||||
get /log returns (LogResponse)
|
||||
|
||||
@doc "Restart System"
|
||||
@handler RestartSystem
|
||||
get /restart
|
||||
}
|
||||
@doc "Restart System"
|
||||
@handler RestartSystem
|
||||
get /restart
|
||||
}
|
||||
+1
-2
@@ -274,5 +274,4 @@ service ppanel {
|
||||
@doc "Get user login logs"
|
||||
@handler GetUserLoginLogs
|
||||
get /login/logs (GetUserLoginLogsRequest) returns (GetUserLoginLogsResponse)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user