This repository was archived by the owner on Sep 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathresponses.go
More file actions
141 lines (123 loc) · 4 KB
/
responses.go
File metadata and controls
141 lines (123 loc) · 4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
package nessie
// loginResp is the internal response to login attemps.
type loginResp struct {
Token string `json:"token"`
}
// ServerProperties is the structure returned by the ServerProperties() method.
type ServerProperties struct {
Token string `json:"token"`
NessusType string `json:"nessus_type"`
NessusUIVersion string `json:"nessus_ui_version"`
ServerVersion string `json:"server_version"`
Feed string `json:"feed"`
Enterprise bool `json:"enterprise"`
LoadedPluginSet string `json:"loaded_plugin_set"`
ServerUUID string `json:"server_uuid"`
Expiration int64 `json:"expiration"`
Notifications []struct {
Type string `json:"type"`
Msg string `json:"message"`
} `json:"notifications"`
ExpirationTime int64 `json:"expiration_time"`
Capabilities struct {
MultiScanner bool `json:"multi_scanner"`
ReportEmailConfig bool `json:"report_email_config"`
} `json:"capabilities"`
PluginSet string `json:"plugin_set"`
IdleTImeout int64 `json:"idle_timeout"`
ScannerBoottime int64 `json:"scanner_boottime"`
LoginBanner bool `json:"login_banner"`
}
// ServerStatus is the stucture returned by the ServerStatus() method.
type ServerStatus struct {
Status string `json:"status"`
Progress int64 `json:"progress"`
MustDestroySession bool
}
type listUsersResp struct {
Users []User `json:"users"`
}
type FamilyDetails struct {
Name string `json:"name"`
ID int64 `json:"id"`
Plugins []Plugin `json:"plugins"`
}
type PluginDetails struct {
Plugin
FamilyName string `json:"family_name"`
Attrs []PluginAttr `json:"attributes"`
}
type listPoliciesResp struct {
Policies []Policy `json:"policies"`
}
type ListScansResponse struct {
Folders []Folder `json:"folders"`
Scans []Scan `json:"scans"`
Timestamp int64 `json:"timestamp"`
}
type listTemplatesResp struct {
Templates []Template `json:"templates"`
}
type startScanResp struct {
UUID string `json:"scan_uuid"`
}
type ScanDetailsResp struct {
UUID string `json:"scan_uuid"`
Info struct {
EditAllowed bool `json:"edit_allowed"`
Status string `json:"status"`
Policy string `json:"policy"`
PCICanUpload bool `json:"pci-can-upload"`
HasAuditTrail bool `json:"hasaudittrail"`
ScanStart int64 `json:"scan_start"`
FolderID int64 `json:"folder_id"`
Targets string `json:"targets"`
Timestamp int64 `json:"timestamp"`
ObjectID int64 `json:"object_id"`
ScannerName string `json:"scanner_name"`
HasKB bool `json:"haskb"`
UUID string `json:"uuid"`
HostCount int64 `json:"hostcount"`
ScanEnd int64 `json:"scan_end"`
Name string `json:"name"`
UserPerms int64 `json:"user_permissions"`
Control bool `json:"control"`
} `json:"info"`
Hosts []Host `json:"hosts"`
CompHosts []Host `json:"comphosts"`
Notes []Note `json:"notes"`
Remediations struct {
Remediation Remediation `json:"remediation"`
} `json:"remediations"`
NumHosts int64 `json:"num_hosts"`
NumCVEs int64 `json:"num_cves"`
NumImpactedHosts int64 `json:"num_impacted_hosts"`
NumRemediatedCVEs int64 `json:"num_remediated_cves"`
Vulnerabilities []Vulnerability `json:"vulnerabilities"`
Compliance []Vulnerability `json:"compliance"`
History []History `json:"history"`
Filters []Filter `json:"filters"`
}
type tzResp struct {
Timezones []TimeZone `json:"timezones"`
}
type listFoldersResp struct {
Folders []Folder `json:"folders"`
}
type exportScanResp struct {
File int64 `json:"file"`
}
type exportStatusResp struct {
Status string `json:"status"`
}
type listGroupsResp struct {
Groups []Group `json:"groups"`
}
type listAgentGroupsResp struct {
Groups []AgentGroup `json:"groups"`
}
// CreatePolicyResp response body If successful
type CreatePolicyResp struct {
PolicyID int64 `json:"policy_id"`
PolicyName string `json:"policy_name"`
}