2023-11-16 14:40:08 +08:00
|
|
|
package dto
|
|
|
|
|
|
|
|
type Fail2BanBaseInfo struct {
|
|
|
|
IsEnable bool `json:"isEnable"`
|
|
|
|
IsActive bool `json:"isActive"`
|
|
|
|
IsExist bool `json:"isExist"`
|
|
|
|
Version string `json:"version"`
|
|
|
|
|
2023-12-11 10:48:06 +08:00
|
|
|
Port int `json:"port"`
|
2023-11-16 14:40:08 +08:00
|
|
|
MaxRetry int `json:"maxRetry"`
|
|
|
|
BanTime string `json:"banTime"`
|
|
|
|
FindTime string `json:"findTime"`
|
|
|
|
BanAction string `json:"banAction"`
|
2023-12-07 14:40:07 +08:00
|
|
|
LogPath string `json:"logPath"`
|
2023-11-16 14:40:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type Fail2BanSearch struct {
|
|
|
|
Status string `json:"status" validate:"required,oneof=banned ignore"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Fail2BanUpdate struct {
|
2023-12-11 13:50:07 +08:00
|
|
|
Key string `json:"key" validate:"required,oneof=port bantime findtime maxretry banaction logpath port"`
|
2023-11-16 14:40:08 +08:00
|
|
|
Value string `json:"value"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Fail2BanSet struct {
|
|
|
|
IPs []string `json:"ips"`
|
|
|
|
Operate string `json:"operate" validate:"required,oneof=banned ignore"`
|
|
|
|
}
|