2023-05-11 18:09:42 +08:00
|
|
|
package dto
|
|
|
|
|
2023-05-16 18:49:27 +08:00
|
|
|
import "time"
|
|
|
|
|
2023-05-11 18:09:42 +08:00
|
|
|
type SSHInfo struct {
|
2023-05-17 18:45:48 +08:00
|
|
|
Status string `json:"status"`
|
2023-06-01 18:27:53 +08:00
|
|
|
Message string `json:"message"`
|
2023-05-17 18:45:48 +08:00
|
|
|
Port string `json:"port"`
|
2023-05-11 18:09:42 +08:00
|
|
|
ListenAddress string `json:"listenAddress"`
|
2023-05-17 18:45:48 +08:00
|
|
|
PasswordAuthentication string `json:"passwordAuthentication"`
|
|
|
|
PubkeyAuthentication string `json:"pubkeyAuthentication"`
|
|
|
|
PermitRootLogin string `json:"permitRootLogin"`
|
|
|
|
UseDNS string `json:"useDNS"`
|
2023-05-11 18:09:42 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type GenerateSSH struct {
|
2023-05-15 19:00:40 +08:00
|
|
|
EncryptionMode string `json:"encryptionMode" validate:"required,oneof=rsa ed25519 ecdsa dsa"`
|
2023-05-11 18:09:42 +08:00
|
|
|
Password string `json:"password"`
|
|
|
|
}
|
2023-05-15 19:00:40 +08:00
|
|
|
|
|
|
|
type GenerateLoad struct {
|
|
|
|
EncryptionMode string `json:"encryptionMode" validate:"required,oneof=rsa ed25519 ecdsa dsa"`
|
|
|
|
}
|
2023-05-16 18:49:27 +08:00
|
|
|
|
2023-05-17 14:45:48 +08:00
|
|
|
type SSHConf struct {
|
|
|
|
File string `json:"file"`
|
|
|
|
}
|
2023-05-16 18:49:27 +08:00
|
|
|
type SearchSSHLog struct {
|
|
|
|
PageInfo
|
|
|
|
Info string `json:"info"`
|
|
|
|
Status string `json:"Status" validate:"required,oneof=Success Failed All"`
|
|
|
|
}
|
|
|
|
type SSHLog struct {
|
|
|
|
Logs []SSHHistory `json:"logs"`
|
|
|
|
TotalCount int `json:"totalCount"`
|
|
|
|
SuccessfulCount int `json:"successfulCount"`
|
|
|
|
FailedCount int `json:"failedCount"`
|
|
|
|
}
|
|
|
|
type SSHHistory struct {
|
|
|
|
Date time.Time `json:"date"`
|
2023-05-17 14:45:48 +08:00
|
|
|
DateStr string `json:"dateStr"`
|
2023-06-01 18:27:53 +08:00
|
|
|
Area string `json:"area"`
|
2023-05-16 18:49:27 +08:00
|
|
|
User string `json:"user"`
|
|
|
|
AuthMode string `json:"authMode"`
|
|
|
|
Address string `json:"address"`
|
|
|
|
Port string `json:"port"`
|
|
|
|
Status string `json:"status"`
|
|
|
|
Message string `json:"message"`
|
|
|
|
}
|