2023-05-11 10:09:42 +00:00
|
|
|
package dto
|
|
|
|
|
2023-05-16 10:49:27 +00:00
|
|
|
import "time"
|
|
|
|
|
2023-11-01 09:12:01 +00:00
|
|
|
type SSHUpdate struct {
|
|
|
|
Key string `json:"key" validate:"required"`
|
|
|
|
OldValue string `json:"oldValue"`
|
|
|
|
NewValue string `json:"newValue"`
|
|
|
|
}
|
|
|
|
|
2023-05-11 10:09:42 +00:00
|
|
|
type SSHInfo struct {
|
2023-11-07 15:41:28 +00:00
|
|
|
AutoStart bool `json:"autoStart"`
|
2023-05-17 10:45:48 +00:00
|
|
|
Status string `json:"status"`
|
2023-06-01 10:27:53 +00:00
|
|
|
Message string `json:"message"`
|
2023-05-17 10:45:48 +00:00
|
|
|
Port string `json:"port"`
|
2023-05-11 10:09:42 +00:00
|
|
|
ListenAddress string `json:"listenAddress"`
|
2023-05-17 10:45:48 +00:00
|
|
|
PasswordAuthentication string `json:"passwordAuthentication"`
|
|
|
|
PubkeyAuthentication string `json:"pubkeyAuthentication"`
|
|
|
|
PermitRootLogin string `json:"permitRootLogin"`
|
|
|
|
UseDNS string `json:"useDNS"`
|
2023-05-11 10:09:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type GenerateSSH struct {
|
2023-05-15 11:00:40 +00:00
|
|
|
EncryptionMode string `json:"encryptionMode" validate:"required,oneof=rsa ed25519 ecdsa dsa"`
|
2023-05-11 10:09:42 +00:00
|
|
|
Password string `json:"password"`
|
|
|
|
}
|
2023-05-15 11:00:40 +00:00
|
|
|
|
|
|
|
type GenerateLoad struct {
|
|
|
|
EncryptionMode string `json:"encryptionMode" validate:"required,oneof=rsa ed25519 ecdsa dsa"`
|
|
|
|
}
|
2023-05-16 10:49:27 +00:00
|
|
|
|
2023-05-17 06:45:48 +00:00
|
|
|
type SSHConf struct {
|
|
|
|
File string `json:"file"`
|
|
|
|
}
|
2023-05-16 10:49:27 +00: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"`
|
|
|
|
}
|
2023-09-20 06:18:20 +00:00
|
|
|
|
|
|
|
type SearchForAnalysis struct {
|
2023-10-11 09:20:30 +00:00
|
|
|
PageInfo
|
2023-09-20 06:18:20 +00:00
|
|
|
OrderBy string `json:"orderBy" validate:"required,oneof=Success Failed"`
|
|
|
|
}
|
|
|
|
|
2023-10-11 09:20:30 +00:00
|
|
|
type AnalysisRes struct {
|
|
|
|
Total int64 `json:"total"`
|
|
|
|
Items []SSHLogAnalysis `json:"items"`
|
|
|
|
SuccessfulCount int `json:"successfulCount"`
|
|
|
|
FailedCount int `json:"failedCount"`
|
|
|
|
}
|
|
|
|
|
2023-09-20 06:18:20 +00:00
|
|
|
type SSHLogAnalysis struct {
|
|
|
|
Address string `json:"address"`
|
|
|
|
Area string `json:"area"`
|
|
|
|
SuccessfulCount int `json:"successfulCount"`
|
|
|
|
FailedCount int `json:"failedCount"`
|
|
|
|
Status string `json:"status"`
|
|
|
|
}
|
|
|
|
|
2023-05-16 10:49:27 +00:00
|
|
|
type SSHHistory struct {
|
|
|
|
Date time.Time `json:"date"`
|
2023-05-17 06:45:48 +00:00
|
|
|
DateStr string `json:"dateStr"`
|
2023-06-01 10:27:53 +00:00
|
|
|
Area string `json:"area"`
|
2023-05-16 10:49:27 +00: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"`
|
|
|
|
}
|