mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 12:40:07 +00:00
send country code in ws, update profile api (#22)
* send country code in ws * make ddns_profiles optional field * update profile api
This commit is contained in:
@@ -8,9 +8,10 @@ type StreamServer struct {
|
||||
PublicNote string `json:"public_note,omitempty"` // 公开备注,只第一个数据包有值
|
||||
DisplayIndex int `json:"display_index,omitempty"` // 展示排序,越大越靠前
|
||||
|
||||
Host *Host `json:"host,omitempty"`
|
||||
State *HostState `json:"state,omitempty"`
|
||||
LastActive time.Time `json:"last_active,omitempty"`
|
||||
Host *Host `json:"host,omitempty"`
|
||||
State *HostState `json:"state,omitempty"`
|
||||
CountryCode string `json:"country_code,omitempty"`
|
||||
LastActive time.Time `json:"last_active,omitempty"`
|
||||
}
|
||||
|
||||
type StreamServerData struct {
|
||||
@@ -20,12 +21,12 @@ type StreamServerData struct {
|
||||
|
||||
type ServerForm struct {
|
||||
Name string `json:"name,omitempty"`
|
||||
Note string `json:"note,omitempty" validate:"optional"` // 管理员可见备注
|
||||
PublicNote string `json:"public_note,omitempty" validate:"optional"` // 公开备注
|
||||
DisplayIndex int `json:"display_index,omitempty" default:"0"` // 展示排序,越大越靠前
|
||||
HideForGuest bool `json:"hide_for_guest,omitempty" validate:"optional"` // 对游客隐藏
|
||||
EnableDDNS bool `json:"enable_ddns,omitempty" validate:"optional"` // 启用DDNS
|
||||
DDNSProfiles []uint64 `gorm:"-" json:"ddns_profiles,omitempty"` // DDNS配置
|
||||
Note string `json:"note,omitempty" validate:"optional"` // 管理员可见备注
|
||||
PublicNote string `json:"public_note,omitempty" validate:"optional"` // 公开备注
|
||||
DisplayIndex int `json:"display_index,omitempty" default:"0"` // 展示排序,越大越靠前
|
||||
HideForGuest bool `json:"hide_for_guest,omitempty" validate:"optional"` // 对游客隐藏
|
||||
EnableDDNS bool `json:"enable_ddns,omitempty" validate:"optional"` // 启用DDNS
|
||||
DDNSProfiles []uint64 `gorm:"-" json:"ddns_profiles,omitempty" validate:"optional"` // DDNS配置
|
||||
}
|
||||
|
||||
type ForceUpdateResponse struct {
|
||||
|
||||
Reference in New Issue
Block a user