52 lines
1.4 KiB
Go
52 lines
1.4 KiB
Go
|
package x3_client
|
||
|
|
||
|
type GeneralResponse[T any] struct {
|
||
|
Success bool `json:"success"`
|
||
|
Message string `json:"msg"`
|
||
|
Object T `json:"obj"`
|
||
|
}
|
||
|
|
||
|
type LoginRequest struct {
|
||
|
Username string `json:"username"`
|
||
|
Password string `json:"password"`
|
||
|
}
|
||
|
|
||
|
type LoginResponse struct {
|
||
|
}
|
||
|
|
||
|
type Inbound struct {
|
||
|
Id int `json:"id"`
|
||
|
Up int `json:"up"`
|
||
|
Down int `json:"down"`
|
||
|
Total int `json:"total"`
|
||
|
Remark string `json:"remark"`
|
||
|
Enable bool `json:"enable"`
|
||
|
ExpiryTime int `json:"expiryTime"`
|
||
|
ClientStats []ClientStats `json:"clientStats"`
|
||
|
Listen string `json:"listen"`
|
||
|
Port int `json:"port"`
|
||
|
Protocol string `json:"protocol"`
|
||
|
Settings string `json:"settings"`
|
||
|
StreamSettings string `json:"streamSettings"`
|
||
|
Tag string `json:"tag"`
|
||
|
Sniffing string `json:"sniffing"`
|
||
|
Allocate string `json:"allocate"`
|
||
|
}
|
||
|
|
||
|
type ClientStats struct {
|
||
|
Id int `json:"id"`
|
||
|
InboundId int `json:"inboundId"`
|
||
|
Enable bool `json:"enable"`
|
||
|
Email string `json:"email"`
|
||
|
Up int `json:"up"`
|
||
|
Down int `json:"down"`
|
||
|
ExpiryTime int `json:"expiryTime"`
|
||
|
Total int `json:"total"`
|
||
|
Reset int `json:"reset"`
|
||
|
}
|
||
|
|
||
|
type CreateClient struct {
|
||
|
Id int `json:"id"`
|
||
|
Settings string `json:"settings"`
|
||
|
}
|