Merge upstream changes and release v1.3.1
This commit is contained in:
commit
d2e9a837cc
@ -84,6 +84,7 @@ func (adapter *Adapter) Client() (*Client, error) {
|
|||||||
OutputFormat: adapter.OutputFormat,
|
OutputFormat: adapter.OutputFormat,
|
||||||
Proxies: []Proxy{},
|
Proxies: []Proxy{},
|
||||||
UserInfo: adapter.UserInfo,
|
UserInfo: adapter.UserInfo,
|
||||||
|
Params: adapter.Params,
|
||||||
}
|
}
|
||||||
|
|
||||||
proxies, err := adapter.Proxies(adapter.Servers)
|
proxies, err := adapter.Proxies(adapter.Servers)
|
||||||
|
|||||||
@ -105,22 +105,6 @@ type (
|
|||||||
Id int64 `json:"id" validate:"required"`
|
Id int64 `json:"id" validate:"required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
GetDeviceOnlineStatsResponse {
|
|
||||||
WeeklyStats []WeeklyStat `json:"weekly_stats"`
|
|
||||||
ConnectionRecords ConnectionRecords `json:"connection_records"`
|
|
||||||
}
|
|
||||||
|
|
||||||
WeeklyStat {
|
|
||||||
Day int `json:"day"`
|
|
||||||
DayName string `json:"day_name"`
|
|
||||||
Hours float64 `json:"hours"`
|
|
||||||
}
|
|
||||||
ConnectionRecords {
|
|
||||||
CurrentContinuousDays int64 `json:"current_continuous_days"`
|
|
||||||
HistoryContinuousDays int64 `json:"history_continuous_days"`
|
|
||||||
LongestSingleConnection int64 `json:"longest_single_connection"`
|
|
||||||
}
|
|
||||||
|
|
||||||
UpdateUserSubscribeNoteRequest {
|
UpdateUserSubscribeNoteRequest {
|
||||||
UserSubscribeId int64 `json:"user_subscribe_id" validate:"required"`
|
UserSubscribeId int64 `json:"user_subscribe_id" validate:"required"`
|
||||||
Note string `json:"note" validate:"max=500"`
|
Note string `json:"note" validate:"max=500"`
|
||||||
@ -151,6 +135,23 @@ type (
|
|||||||
List []WithdrawalLog `json:"list"`
|
List []WithdrawalLog `json:"list"`
|
||||||
Total int64 `json:"total"`
|
Total int64 `json:"total"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
GetDeviceOnlineStatsResponse {
|
||||||
|
WeeklyStats []WeeklyStat `json:"weekly_stats"`
|
||||||
|
ConnectionRecords ConnectionRecords `json:"connection_records"`
|
||||||
|
}
|
||||||
|
|
||||||
|
WeeklyStat {
|
||||||
|
Day int `json:"day"`
|
||||||
|
DayName string `json:"day_name"`
|
||||||
|
Hours float64 `json:"hours"`
|
||||||
|
}
|
||||||
|
ConnectionRecords {
|
||||||
|
CurrentContinuousDays int64 `json:"current_continuous_days"`
|
||||||
|
HistoryContinuousDays int64 `json:"history_continuous_days"`
|
||||||
|
LongestSingleConnection int64 `json:"longest_single_connection"`
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@server (
|
@server (
|
||||||
@ -251,9 +252,25 @@ service ppanel {
|
|||||||
@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)
|
||||||
|
|
||||||
|
@doc "Update User Subscribe Note"
|
||||||
|
@handler UpdateUserSubscribeNote
|
||||||
|
put /subscribe_note (UpdateUserSubscribeNoteRequest)
|
||||||
|
|
||||||
|
@doc "Update User Rules"
|
||||||
|
@handler UpdateUserRules
|
||||||
|
put /rules (UpdateUserRulesRequest)
|
||||||
|
|
||||||
|
@doc "Commission Withdraw"
|
||||||
|
@handler CommissionWithdraw
|
||||||
|
post /commission_withdraw (CommissionWithdrawRequest) returns (WithdrawalLog)
|
||||||
|
|
||||||
|
@doc "Query Withdrawal Log"
|
||||||
|
@handler QueryWithdrawalLog
|
||||||
|
get /withdrawal_log (QueryWithdrawalLogListRequest) returns (QueryWithdrawalLogListResponse)
|
||||||
|
|
||||||
@doc "Device Online Statistics"
|
@doc "Device Online Statistics"
|
||||||
@handler DeviceOnlineStatistics
|
@handler DeviceOnlineStatistics
|
||||||
@ -263,20 +280,5 @@ service ppanel {
|
|||||||
@handler DeleteCurrentUserAccount
|
@handler DeleteCurrentUserAccount
|
||||||
delete /current_user_account
|
delete /current_user_account
|
||||||
|
|
||||||
@doc "Update User Subscribe Note"
|
|
||||||
@handler UpdateUserSubscribeNote
|
|
||||||
put /subscribe_note (UpdateUserSubscribeNoteRequest)
|
|
||||||
|
|
||||||
@doc "Update User Rules"
|
|
||||||
@handler UpdateUserRules
|
|
||||||
put /rules (UpdateUserRulesRequest)
|
|
||||||
|
|
||||||
@doc "Commission Withdraw"
|
|
||||||
@handler CommissionWithdraw
|
|
||||||
post /commission_withdraw (CommissionWithdrawRequest) returns (WithdrawalLog)
|
|
||||||
|
|
||||||
@doc "Query Withdrawal Log"
|
|
||||||
@handler QueryWithdrawalLog
|
|
||||||
get /withdrawal_log (QueryWithdrawalLogListRequest) returns (QueryWithdrawalLogListResponse)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -32,6 +32,7 @@ type (
|
|||||||
CreatedAt int64 `json:"created_at"`
|
CreatedAt int64 `json:"created_at"`
|
||||||
UpdatedAt int64 `json:"updated_at"`
|
UpdatedAt int64 `json:"updated_at"`
|
||||||
DeletedAt int64 `json:"deleted_at,omitempty"`
|
DeletedAt int64 `json:"deleted_at,omitempty"`
|
||||||
|
IsDel bool `json:"is_del,omitempty"`
|
||||||
}
|
}
|
||||||
Follow {
|
Follow {
|
||||||
Id int64 `json:"id"`
|
Id int64 `json:"id"`
|
||||||
@ -135,14 +136,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"`
|
||||||
|
|||||||
@ -51,7 +51,8 @@ type Subscribe struct {
|
|||||||
Upload int64 `gorm:"default:0;comment:Upload Traffic"`
|
Upload int64 `gorm:"default:0;comment:Upload Traffic"`
|
||||||
Token string `gorm:"index:idx_token;unique;type:varchar(255);default:'';comment:Token"`
|
Token string `gorm:"index:idx_token;unique;type:varchar(255);default:'';comment:Token"`
|
||||||
UUID string `gorm:"type:varchar(255);unique;index:idx_uuid;default:'';comment:UUID"`
|
UUID string `gorm:"type:varchar(255);unique;index:idx_uuid;default:'';comment:UUID"`
|
||||||
Status uint8 `gorm:"type:tinyint(1);default:0;comment:Subscription Status: 0: Pending 1: Active 2: Finished 3: Expired 4: Deducted"`
|
Status uint8 `gorm:"type:tinyint(1);default:0;comment:Subscription Status: 0: Pending 1: Active 2: Finished 3: Expired 4: Deducted 5: stopped"`
|
||||||
|
Note string `gorm:"type:varchar(500);default:'';comment:User note for subscription"`
|
||||||
CreatedAt time.Time `gorm:"<-:create;comment:Creation Time"`
|
CreatedAt time.Time `gorm:"<-:create;comment:Creation Time"`
|
||||||
UpdatedAt time.Time `gorm:"comment:Update Time"`
|
UpdatedAt time.Time `gorm:"comment:Update Time"`
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2651,6 +2651,7 @@ type User struct {
|
|||||||
CreatedAt int64 `json:"created_at"`
|
CreatedAt int64 `json:"created_at"`
|
||||||
UpdatedAt int64 `json:"updated_at"`
|
UpdatedAt int64 `json:"updated_at"`
|
||||||
DeletedAt int64 `json:"deleted_at,omitempty"`
|
DeletedAt int64 `json:"deleted_at,omitempty"`
|
||||||
|
IsDel bool `json:"is_del,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type UserAffiliate struct {
|
type UserAffiliate struct {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user