style
This commit is contained in:
parent
cb5bf5aae3
commit
d0aad68bb0
@ -19,8 +19,13 @@ type (
|
|||||||
Periods []TimePeriod `json:"periods"`
|
Periods []TimePeriod `json:"periods"`
|
||||||
}
|
}
|
||||||
PreViewNodeMultiplierResponse {
|
PreViewNodeMultiplierResponse {
|
||||||
CurrentTime string `json:"current_time"`
|
CurrentTime string `json:"current_time"`
|
||||||
Ratio float32 `json:"ratio"`
|
Ratio float32 `json:"ratio"`
|
||||||
|
}
|
||||||
|
ModuleConfig {
|
||||||
|
Secret string `json:"secret"` // 通讯密钥
|
||||||
|
ServiceName string `json:"service_name"` // 服务名称
|
||||||
|
ServiceVersion string `json:"service_version"` // 服务版本
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -125,5 +130,9 @@ service ppanel {
|
|||||||
@doc "PreView Node Multiplier"
|
@doc "PreView Node Multiplier"
|
||||||
@handler PreViewNodeMultiplier
|
@handler PreViewNodeMultiplier
|
||||||
get /node_multiplier/preview returns (PreViewNodeMultiplierResponse)
|
get /node_multiplier/preview returns (PreViewNodeMultiplierResponse)
|
||||||
|
|
||||||
|
@doc "Get Module Config"
|
||||||
|
@handler GetModuleConfig
|
||||||
|
get /module returns (ModuleConfig)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@ type (
|
|||||||
Password string `json:"password" validate:"required"`
|
Password string `json:"password" validate:"required"`
|
||||||
IP string `header:"X-Original-Forwarded-For"`
|
IP string `header:"X-Original-Forwarded-For"`
|
||||||
UserAgent string `header:"User-Agent"`
|
UserAgent string `header:"User-Agent"`
|
||||||
LoginType string `header:"Login-Type"`
|
LoginType string `header:"Login-Type"`
|
||||||
CfToken string `json:"cf_token,optional"`
|
CfToken string `json:"cf_token,optional"`
|
||||||
}
|
}
|
||||||
// Check user is exist request
|
// Check user is exist request
|
||||||
@ -36,19 +36,19 @@ type (
|
|||||||
Code string `json:"code,optional"`
|
Code string `json:"code,optional"`
|
||||||
IP string `header:"X-Original-Forwarded-For"`
|
IP string `header:"X-Original-Forwarded-For"`
|
||||||
UserAgent string `header:"User-Agent"`
|
UserAgent string `header:"User-Agent"`
|
||||||
LoginType string `header:"Login-Type"`
|
LoginType string `header:"Login-Type"`
|
||||||
CfToken string `json:"cf_token,optional"`
|
CfToken string `json:"cf_token,optional"`
|
||||||
}
|
}
|
||||||
// User login response
|
// User login response
|
||||||
ResetPasswordRequest {
|
ResetPasswordRequest {
|
||||||
Identifier string `json:"identifier"`
|
Identifier string `json:"identifier"`
|
||||||
Email string `json:"email" validate:"required"`
|
Email string `json:"email" validate:"required"`
|
||||||
Password string `json:"password" validate:"required"`
|
Password string `json:"password" validate:"required"`
|
||||||
Code string `json:"code,optional"`
|
Code string `json:"code,optional"`
|
||||||
IP string `header:"X-Original-Forwarded-For"`
|
IP string `header:"X-Original-Forwarded-For"`
|
||||||
UserAgent string `header:"User-Agent"`
|
UserAgent string `header:"User-Agent"`
|
||||||
LoginType string `header:"Login-Type"`
|
LoginType string `header:"Login-Type"`
|
||||||
CfToken string `json:"cf_token,optional"`
|
CfToken string `json:"cf_token,optional"`
|
||||||
}
|
}
|
||||||
LoginResponse {
|
LoginResponse {
|
||||||
Token string `json:"token"`
|
Token string `json:"token"`
|
||||||
@ -73,7 +73,7 @@ type (
|
|||||||
Password string `json:"password"`
|
Password string `json:"password"`
|
||||||
IP string `header:"X-Original-Forwarded-For"`
|
IP string `header:"X-Original-Forwarded-For"`
|
||||||
UserAgent string `header:"User-Agent"`
|
UserAgent string `header:"User-Agent"`
|
||||||
LoginType string `header:"Login-Type"`
|
LoginType string `header:"Login-Type"`
|
||||||
CfToken string `json:"cf_token,optional"`
|
CfToken string `json:"cf_token,optional"`
|
||||||
}
|
}
|
||||||
// Check user is exist request
|
// Check user is exist request
|
||||||
@ -95,19 +95,19 @@ type (
|
|||||||
Code string `json:"code,optional"`
|
Code string `json:"code,optional"`
|
||||||
IP string `header:"X-Original-Forwarded-For"`
|
IP string `header:"X-Original-Forwarded-For"`
|
||||||
UserAgent string `header:"User-Agent"`
|
UserAgent string `header:"User-Agent"`
|
||||||
LoginType string `header:"Login-Type,optional"`
|
LoginType string `header:"Login-Type,optional"`
|
||||||
CfToken string `json:"cf_token,optional"`
|
CfToken string `json:"cf_token,optional"`
|
||||||
}
|
}
|
||||||
// User login response
|
// User login response
|
||||||
TelephoneResetPasswordRequest {
|
TelephoneResetPasswordRequest {
|
||||||
Identifier string `json:"identifier"`
|
Identifier string `json:"identifier"`
|
||||||
Telephone string `json:"telephone" validate:"required"`
|
Telephone string `json:"telephone" validate:"required"`
|
||||||
TelephoneAreaCode string `json:"telephone_area_code" validate:"required"`
|
TelephoneAreaCode string `json:"telephone_area_code" validate:"required"`
|
||||||
Password string `json:"password" validate:"required"`
|
Password string `json:"password" validate:"required"`
|
||||||
Code string `json:"code,optional"`
|
Code string `json:"code,optional"`
|
||||||
IP string `header:"X-Original-Forwarded-For"`
|
IP string `header:"X-Original-Forwarded-For"`
|
||||||
UserAgent string `header:"User-Agent"`
|
UserAgent string `header:"User-Agent"`
|
||||||
LoginType string `header:"Login-Type,optional"`
|
LoginType string `header:"Login-Type,optional"`
|
||||||
CfToken string `json:"cf_token,optional"`
|
CfToken string `json:"cf_token,optional"`
|
||||||
}
|
}
|
||||||
AppleLoginCallbackRequest {
|
AppleLoginCallbackRequest {
|
||||||
@ -128,9 +128,9 @@ type (
|
|||||||
)
|
)
|
||||||
|
|
||||||
@server (
|
@server (
|
||||||
prefix: v1/auth
|
prefix: v1/auth
|
||||||
group: auth
|
group: auth
|
||||||
middleware: DeviceMiddleware
|
middleware: DeviceMiddleware
|
||||||
)
|
)
|
||||||
service ppanel {
|
service ppanel {
|
||||||
@doc "User login"
|
@doc "User login"
|
||||||
|
|||||||
@ -90,9 +90,9 @@ type (
|
|||||||
)
|
)
|
||||||
|
|
||||||
@server (
|
@server (
|
||||||
prefix: v1/common
|
prefix: v1/common
|
||||||
group: common
|
group: common
|
||||||
middleware: DeviceMiddleware
|
middleware: DeviceMiddleware
|
||||||
)
|
)
|
||||||
service ppanel {
|
service ppanel {
|
||||||
@doc "Get global config"
|
@doc "Get global config"
|
||||||
|
|||||||
@ -68,9 +68,9 @@ type (
|
|||||||
)
|
)
|
||||||
|
|
||||||
@server (
|
@server (
|
||||||
prefix: v1/public/portal
|
prefix: v1/public/portal
|
||||||
group: public/portal
|
group: public/portal
|
||||||
middleware: DeviceMiddleware
|
middleware: DeviceMiddleware
|
||||||
)
|
)
|
||||||
service ppanel {
|
service ppanel {
|
||||||
@doc "Get available payment methods"
|
@doc "Get available payment methods"
|
||||||
|
|||||||
@ -14,43 +14,40 @@ type (
|
|||||||
QuerySubscribeListRequest {
|
QuerySubscribeListRequest {
|
||||||
Language string `form:"language"`
|
Language string `form:"language"`
|
||||||
}
|
}
|
||||||
|
QueryUserSubscribeNodeListResponse {
|
||||||
QueryUserSubscribeNodeListResponse {
|
List []UserSubscribeInfo `json:"list"`
|
||||||
List []UserSubscribeInfo `json:"list"`
|
}
|
||||||
}
|
UserSubscribeInfo {
|
||||||
|
Id int64 `json:"id"`
|
||||||
UserSubscribeInfo {
|
UserId int64 `json:"user_id"`
|
||||||
Id int64 `json:"id"`
|
OrderId int64 `json:"order_id"`
|
||||||
UserId int64 `json:"user_id"`
|
SubscribeId int64 `json:"subscribe_id"`
|
||||||
OrderId int64 `json:"order_id"`
|
StartTime int64 `json:"start_time"`
|
||||||
SubscribeId int64 `json:"subscribe_id"`
|
ExpireTime int64 `json:"expire_time"`
|
||||||
StartTime int64 `json:"start_time"`
|
FinishedAt int64 `json:"finished_at"`
|
||||||
ExpireTime int64 `json:"expire_time"`
|
ResetTime int64 `json:"reset_time"`
|
||||||
FinishedAt int64 `json:"finished_at"`
|
Traffic int64 `json:"traffic"`
|
||||||
ResetTime int64 `json:"reset_time"`
|
Download int64 `json:"download"`
|
||||||
Traffic int64 `json:"traffic"`
|
Upload int64 `json:"upload"`
|
||||||
Download int64 `json:"download"`
|
Token string `json:"token"`
|
||||||
Upload int64 `json:"upload"`
|
Status uint8 `json:"status"`
|
||||||
Token string `json:"token"`
|
CreatedAt int64 `json:"created_at"`
|
||||||
Status uint8 `json:"status"`
|
UpdatedAt int64 `json:"updated_at"`
|
||||||
CreatedAt int64 `json:"created_at"`
|
IsTryOut bool `json:"is_try_out"`
|
||||||
UpdatedAt int64 `json:"updated_at"`
|
Nodes []*UserSubscribeNodeInfo `json:"nodes"`
|
||||||
IsTryOut bool `json:"is_try_out"`
|
}
|
||||||
Nodes []*UserSubscribeNodeInfo `json:"nodes"`
|
UserSubscribeNodeInfo {
|
||||||
}
|
Id int64 `json:"id"`
|
||||||
|
Name string `json:"name"`
|
||||||
UserSubscribeNodeInfo{
|
Uuid string `json:"uuid"`
|
||||||
Id int64 `json:"id"`
|
Protocol string `json:"protocol"`
|
||||||
Name string `json:"name"`
|
Port uint16 `json:"port"`
|
||||||
Uuid string `json:"uuid"`
|
Address string `json:"address"`
|
||||||
Protocol string `json:"protocol"`
|
Tags []string `json:"tags"`
|
||||||
Port uint16 `json:"port"`
|
Country string `json:"country"`
|
||||||
Address string `json:"address"`
|
City string `json:"city"`
|
||||||
Tags []string `json:"tags"`
|
CreatedAt int64 `json:"created_at"`
|
||||||
Country string `json:"country"`
|
}
|
||||||
City string `json:"city"`
|
|
||||||
CreatedAt int64 `json:"created_at"`
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@server (
|
@server (
|
||||||
@ -63,8 +60,8 @@ service ppanel {
|
|||||||
@handler QuerySubscribeList
|
@handler QuerySubscribeList
|
||||||
get /list (QuerySubscribeListRequest) returns (QuerySubscribeListResponse)
|
get /list (QuerySubscribeListRequest) returns (QuerySubscribeListResponse)
|
||||||
|
|
||||||
@doc "Get user subscribe node info"
|
@doc "Get user subscribe node info"
|
||||||
@handler QueryUserSubscribeNodeList
|
@handler QueryUserSubscribeNodeList
|
||||||
get /node/list returns (QueryUserSubscribeNodeListResponse)
|
get /node/list returns (QueryUserSubscribeNodeListResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -97,15 +97,13 @@ type (
|
|||||||
Email string `json:"email" validate:"required"`
|
Email string `json:"email" validate:"required"`
|
||||||
Code string `json:"code" validate:"required"`
|
Code string `json:"code" validate:"required"`
|
||||||
}
|
}
|
||||||
|
GetDeviceListResponse {
|
||||||
GetDeviceListResponse {
|
List []UserDevice `json:"list"`
|
||||||
List []UserDevice `json:"list"`
|
Total int64 `json:"total"`
|
||||||
Total int64 `json:"total"`
|
}
|
||||||
}
|
UnbindDeviceRequest {
|
||||||
|
Id int64 `json:"id" validate:"required"`
|
||||||
UnbindDeviceRequest {
|
}
|
||||||
Id int64 `json:"id" validate:"required"`
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@server (
|
@server (
|
||||||
@ -202,12 +200,12 @@ service ppanel {
|
|||||||
@handler UpdateBindEmail
|
@handler UpdateBindEmail
|
||||||
put /bind_email (UpdateBindEmailRequest)
|
put /bind_email (UpdateBindEmailRequest)
|
||||||
|
|
||||||
@doc "Get Device List"
|
@doc "Get Device List"
|
||||||
@handler GetDeviceList
|
@handler GetDeviceList
|
||||||
get /devices returns (GetDeviceListResponse)
|
get /devices returns (GetDeviceListResponse)
|
||||||
|
|
||||||
@doc "Unbind Device"
|
@doc "Unbind Device"
|
||||||
@handler UnbindDevice
|
@handler UnbindDevice
|
||||||
put /unbind_device (UnbindDeviceRequest)
|
put /unbind_device (UnbindDeviceRequest)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -115,7 +115,7 @@ type (
|
|||||||
AuthConfig {
|
AuthConfig {
|
||||||
Mobile MobileAuthenticateConfig `json:"mobile"`
|
Mobile MobileAuthenticateConfig `json:"mobile"`
|
||||||
Email EmailAuthticateConfig `json:"email"`
|
Email EmailAuthticateConfig `json:"email"`
|
||||||
Device DeviceAuthticateConfig `json:"device"`
|
Device DeviceAuthticateConfig `json:"device"`
|
||||||
Register PubilcRegisterConfig `json:"register"`
|
Register PubilcRegisterConfig `json:"register"`
|
||||||
}
|
}
|
||||||
PubilcRegisterConfig {
|
PubilcRegisterConfig {
|
||||||
@ -135,14 +135,12 @@ type (
|
|||||||
EnableDomainSuffix bool `json:"enable_domain_suffix"`
|
EnableDomainSuffix bool `json:"enable_domain_suffix"`
|
||||||
DomainSuffixList string `json:"domain_suffix_list"`
|
DomainSuffixList string `json:"domain_suffix_list"`
|
||||||
}
|
}
|
||||||
|
DeviceAuthticateConfig {
|
||||||
DeviceAuthticateConfig {
|
Enable bool `json:"enable"`
|
||||||
Enable bool `json:"enable"`
|
ShowAds bool `json:"show_ads"`
|
||||||
ShowAds bool `json:"show_ads"`
|
EnableSecurity bool `json:"enable_security"`
|
||||||
EnableSecurity bool `json:"enable_security"`
|
OnlyRealDevice bool `json:"only_real_device"`
|
||||||
OnlyRealDevice bool `json:"only_real_device"`
|
}
|
||||||
}
|
|
||||||
|
|
||||||
RegisterConfig {
|
RegisterConfig {
|
||||||
StopRegister bool `json:"stop_register"`
|
StopRegister bool `json:"stop_register"`
|
||||||
EnableTrial bool `json:"enable_trial"`
|
EnableTrial bool `json:"enable_trial"`
|
||||||
@ -673,7 +671,6 @@ type (
|
|||||||
List []SubscribeGroup `json:"list"`
|
List []SubscribeGroup `json:"list"`
|
||||||
Total int64 `json:"total"`
|
Total int64 `json:"total"`
|
||||||
}
|
}
|
||||||
|
|
||||||
GetUserSubscribeTrafficLogsRequest {
|
GetUserSubscribeTrafficLogsRequest {
|
||||||
Page int `form:"page"`
|
Page int `form:"page"`
|
||||||
Size int `form:"size"`
|
Size int `form:"size"`
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user