github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/antiddos/v2/alarmreminding/results.go (about) 1 package alarmreminding 2 3 import ( 4 "github.com/chnsz/golangsdk" 5 ) 6 7 type commonResult struct { 8 golangsdk.Result 9 } 10 11 type WarnAlertResult struct { 12 commonResult 13 } 14 15 func (r WarnAlertResult) Extract() (*WarnAlertResponse, error) { 16 var response WarnAlertResponse 17 err := r.ExtractInto(&response) 18 return &response, err 19 } 20 21 type WarnAlertResponse struct { 22 // Alarm configuration 23 WarnConfig struct { 24 // DDoS attacks 25 AntiDDoS bool `json:"antiDDoS,"` 26 27 // Deprecated 28 // Brute force cracking (system logins, FTP, and DB) 29 BruceForce bool `json:"bruce_force,omitempty"` 30 31 // Deprecated 32 // Alarms about remote logins 33 RemoteLogin bool `json:"remote_login,omitempty"` 34 35 // Deprecated 36 // Weak passwords (system and database) 37 WeakPassword bool `json:"weak_password,omitempty"` 38 39 // Deprecated 40 // Overly high rights of a database process 41 HighPrivilege bool `json:"high_privilege,omitempty"` 42 43 // Deprecated 44 // Web page backdoors 45 BackDoors bool `json:"back_doors,omitempty"` 46 47 // Deprecated 48 // Reserved 49 Waf bool `json:"waf,omitempty"` 50 51 // Deprecated 52 // Possible values: 0: indicates that alarms are sent once a day. 1: indicates that alarms are sent once every half hour. This parameter is mandatory for the Host Intrusion Detection (HID) service. 53 SendFrequency int `json:"send_frequency,omitempty"` 54 } `json:"warn_config,"` 55 56 // ID of an alarm group 57 TopicUrn string `json:"topic_urn,"` 58 59 // Description of an alarm group 60 DisplayName string `json:"display_name,"` 61 } 62 63 type UpdateResult struct { 64 commonResult 65 } 66 67 func (r UpdateResult) Extract() (*WarnAlertResponse, error) { 68 var response WarnAlertResponse 69 err := r.ExtractInto(&response) 70 return &response, err 71 }