mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 12:40:07 +00:00
feat: server group api
This commit is contained in:
@@ -18,7 +18,7 @@ type StreamServerData struct {
|
||||
Servers []StreamServer `json:"servers,omitempty"`
|
||||
}
|
||||
|
||||
type EditServer struct {
|
||||
type ServerForm struct {
|
||||
Name string `json:"name,omitempty"`
|
||||
Note string `json:"note,omitempty"` // 管理员可见备注
|
||||
PublicNote string `json:"public_note,omitempty"` // 公开备注
|
||||
|
||||
11
model/server_group_api.go
Normal file
11
model/server_group_api.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package model
|
||||
|
||||
type ServerGroupForm struct {
|
||||
Name string `json:"name"`
|
||||
Servers []uint64 `json:"servers"`
|
||||
}
|
||||
|
||||
type ServerGroupResponseItem struct {
|
||||
Group ServerGroup `json:"group"`
|
||||
Servers []uint64 `json:"servers"`
|
||||
}
|
||||
@@ -2,6 +2,6 @@ package model
|
||||
|
||||
type ServerGroupServer struct {
|
||||
Common
|
||||
ServerGroupId uint64 `json:"server_group_id"`
|
||||
ServerId uint64 `json:"server_id"`
|
||||
ServerGroupId uint64 `json:"server_group_id" gorm:"uniqueIndex:idx_server_group_server"`
|
||||
ServerId uint64 `json:"server_id" gorm:"uniqueIndex:idx_server_group_server"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user