2022-08-18 18:54:21 +08:00
|
|
|
package dto
|
|
|
|
|
2022-08-30 18:49:07 +08:00
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
2022-08-18 18:54:21 +08:00
|
|
|
|
2022-08-31 23:16:10 +08:00
|
|
|
type HostOperate struct {
|
|
|
|
GroupBelong string `json:"groupBelong" validate:"required"`
|
|
|
|
Name string `json:"name" validate:"required"`
|
|
|
|
Addr string `json:"addr" validate:"required,ip"`
|
|
|
|
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"`
|
|
|
|
PrivateKey string `json:"privateKey"`
|
|
|
|
Password string `json:"password"`
|
2022-08-18 18:54:21 +08:00
|
|
|
|
|
|
|
Description string `json:"description"`
|
|
|
|
}
|
|
|
|
|
2022-09-01 16:52:58 +08:00
|
|
|
type HostConnTest struct {
|
|
|
|
Addr string `json:"addr" validate:"required,ip"`
|
|
|
|
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"`
|
|
|
|
PrivateKey string `json:"privateKey"`
|
|
|
|
Password string `json:"password"`
|
|
|
|
}
|
|
|
|
|
2022-08-30 18:49:07 +08:00
|
|
|
type SearchForTree struct {
|
2022-08-29 18:44:35 +08:00
|
|
|
Info string `json:"info"`
|
|
|
|
}
|
|
|
|
|
2022-08-18 18:54:21 +08:00
|
|
|
type HostInfo struct {
|
2022-08-31 23:16:10 +08:00
|
|
|
ID uint `json:"id"`
|
|
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
GroupBelong string `json:"groupBelong"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Addr string `json:"addr"`
|
|
|
|
Port uint `json:"port"`
|
|
|
|
User string `json:"user"`
|
|
|
|
AuthMode string `json:"authMode"`
|
2022-08-18 18:54:21 +08:00
|
|
|
|
|
|
|
Description string `json:"description"`
|
|
|
|
}
|
|
|
|
|
2022-08-30 18:49:07 +08:00
|
|
|
type HostTree struct {
|
2022-08-31 23:16:10 +08:00
|
|
|
ID uint `json:"id"`
|
2022-08-30 18:49:07 +08:00
|
|
|
Label string `json:"label"`
|
|
|
|
Children []TreeChild `json:"children"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type TreeChild struct {
|
2022-08-31 23:16:10 +08:00
|
|
|
ID uint `json:"id"`
|
2022-08-30 18:49:07 +08:00
|
|
|
Label string `json:"label"`
|
|
|
|
}
|