2022-08-18 10:54:21 +00:00
|
|
|
package dto
|
|
|
|
|
2022-08-30 10:49:07 +00:00
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
2022-08-18 10:54:21 +00:00
|
|
|
|
2022-08-31 15:16:10 +00:00
|
|
|
type HostOperate struct {
|
2023-04-10 13:50:24 +00:00
|
|
|
ID uint `json:"id"`
|
|
|
|
GroupID uint `json:"groupID"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Addr string `json:"addr" validate:"required"`
|
|
|
|
Port uint `json:"port" validate:"required,number,max=65535,min=1"`
|
|
|
|
User string `json:"user" validate:"required"`
|
|
|
|
AuthMode string `json:"authMode" validate:"oneof=password key"`
|
|
|
|
Password string `json:"password"`
|
|
|
|
PrivateKey string `json:"privateKey"`
|
|
|
|
PassPhrase string `json:"passPhrase"`
|
|
|
|
RememberPassword bool `json:"rememberPassword"`
|
2022-08-18 10:54:21 +00:00
|
|
|
|
|
|
|
Description string `json:"description"`
|
|
|
|
}
|
|
|
|
|
2022-09-01 08:52:58 +00:00
|
|
|
type HostConnTest struct {
|
2023-03-13 16:15:51 +00:00
|
|
|
Addr string `json:"addr" validate:"required"`
|
2022-09-01 08:52:58 +00:00
|
|
|
Port uint `json:"port" validate:"required,number,max=65535,min=1"`
|
|
|
|
User string `json:"user" validate:"required"`
|
|
|
|
AuthMode string `json:"authMode" validate:"oneof=password key"`
|
|
|
|
Password string `json:"password"`
|
2023-04-10 13:50:24 +00:00
|
|
|
PrivateKey string `json:"privateKey"`
|
|
|
|
PassPhrase string `json:"passPhrase"`
|
2022-09-01 08:52:58 +00:00
|
|
|
}
|
|
|
|
|
2023-03-01 09:43:28 +00:00
|
|
|
type SearchHostWithPage struct {
|
|
|
|
PageInfo
|
2023-03-06 09:18:13 +00:00
|
|
|
GroupID uint `json:"groupID"`
|
|
|
|
Info string `json:"info"`
|
2023-03-01 09:43:28 +00:00
|
|
|
}
|
|
|
|
|
2022-08-30 10:49:07 +00:00
|
|
|
type SearchForTree struct {
|
2022-08-29 10:44:35 +00:00
|
|
|
Info string `json:"info"`
|
|
|
|
}
|
|
|
|
|
2023-03-01 09:43:28 +00:00
|
|
|
type ChangeHostGroup struct {
|
2023-03-06 09:18:13 +00:00
|
|
|
ID uint `json:"id" validate:"required"`
|
|
|
|
GroupID uint `json:"groupID" validate:"required"`
|
2023-03-01 09:43:28 +00:00
|
|
|
}
|
|
|
|
|
2022-08-18 10:54:21 +00:00
|
|
|
type HostInfo struct {
|
2023-04-10 13:50:24 +00:00
|
|
|
ID uint `json:"id"`
|
|
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
GroupID uint `json:"groupID"`
|
|
|
|
GroupBelong string `json:"groupBelong"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Addr string `json:"addr"`
|
|
|
|
Port uint `json:"port"`
|
|
|
|
User string `json:"user"`
|
|
|
|
AuthMode string `json:"authMode"`
|
|
|
|
Password string `json:"password"`
|
|
|
|
PrivateKey string `json:"privateKey"`
|
|
|
|
PassPhrase string `json:"passPhrase"`
|
|
|
|
RememberPassword bool `json:"rememberPassword"`
|
2022-08-18 10:54:21 +00:00
|
|
|
|
|
|
|
Description string `json:"description"`
|
|
|
|
}
|
|
|
|
|
2022-08-30 10:49:07 +00:00
|
|
|
type HostTree struct {
|
2022-08-31 15:16:10 +00:00
|
|
|
ID uint `json:"id"`
|
2022-08-30 10:49:07 +00:00
|
|
|
Label string `json:"label"`
|
|
|
|
Children []TreeChild `json:"children"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type TreeChild struct {
|
2022-08-31 15:16:10 +00:00
|
|
|
ID uint `json:"id"`
|
2022-08-30 10:49:07 +00:00
|
|
|
Label string `json:"label"`
|
|
|
|
}
|