Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ScanDetails ¶
type ScanDetails struct {
Info struct {
ID int `json:"id"`
Name string `json:"name"`
Status string `json:"status"`
ScanStart string `json:"scan_start"`
ScanEnd string `json:"scan_end"`
ScanType string `json:"scan_type"`
Targets string `json:"targets"`
ObjectID string `json:"object_id"`
Owner string `json:"owner"`
Policy string `json:"policy"`
ScannerName string `json:"scanner_name"`
} `json:"info"`
}
ScanDetails represents the detailed information of a scan
func GetScanDetails ¶
func GetScanDetails(apiURL string, apiKey string, scanID int) (*ScanDetails, error)
GetScanDetails fetches details for a specific scan from Tenable
type ScanList ¶
type ScanList struct {
Scans []struct {
ID int `json:"id"`
UUID string `json:"uuid"`
Name string `json:"name"`
Status string `json:"status"`
CreationDate int64 `json:"creation_date"`
LastModifiedDate int64 `json:"last_modification_date"`
} `json:"scans"`
Folders []struct {
ID int `json:"id"`
Name string `json:"name"`
} `json:"folders"`
}
ScanList represents the list of scans returned by the API
type ScanPayload ¶
type ScanPayload struct {
Settings ScanSettings `json:"settings"`
}
ScanPayload represents the payload for creating a scan
type ScanResponse ¶
type ScanResponse struct {
ScanID int `json:"scan_id"`
}
ScanResponse represents the response from the scan creation API
func CreateScan ¶
func CreateScan(apiURL, apiKey string, payload ScanPayload) (*ScanResponse, error)
CreateScan creates a new scan with the given settings
type ScanSettings ¶
type ScanSettings struct {
Name string `json:"name"`
Description string `json:"description"`
Targets string `json:"targets"`
}
ScanSettings represents the settings for the scan
type SimpleResponse ¶
type SimpleResponse struct {
Message string `json:"message"`
}
SimpleResponse represents a simplified response from the API, for illustration
func UpdateScan ¶
func UpdateScan(apiURL, apiKey string, scanID int, payload UpdateScanPayload) (*SimpleResponse, error)
UpdateScan updates an existing scan with the given settings
type UpdateScanPayload ¶
type UpdateScanPayload struct {
Settings UpdateScanSettings `json:"settings"`
}
UpdateScanPayload represents the payload for updating a scan
type UpdateScanSettings ¶
type UpdateScanSettings struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Targets string `json:"text_targets,omitempty"`
}
UpdateScanSettings represents the settings to update a scan