-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revisit Scan API model to allow for ScanConfig expand, snapshot and summary #92
Conversation
@@ -40,7 +40,7 @@ type Scan struct { | |||
// ScanConfigID The ID of the config that this scan was initiated from (optionanl) | |||
ScanConfigID *string `json:"scan_config_id,omitempty" gorm:"column:scan_config_id"` | |||
// ScanFamiliesConfig The configuration of the scanner families within a scan config | |||
ScanFamiliesConfig []byte `json:"scan_families_config,omitempty" gorm:"column:scan_families_config"` | |||
ScanConfigSnapshot []byte `json:"scan_families_config,omitempty" gorm:"column:scan_families_config"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sambetts-cisco @akpsgit need to fix the json
and gorm
tags (scan_families_config
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also the comment needs fixing
reason := models.ScanStateReasonNothingToScan | ||
scan := &models.Scan{ | ||
EndTime: &t, | ||
State: utils.PointerTo[models.ScanState](models.Done), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sambetts-cisco I think that just calling utils.PointerTo(models.Done)
will also do the work
TargetIDs: targetIds, | ||
State: utils.PointerTo[models.ScanState](models.Discovered), | ||
StateMessage: utils.PointerTo[string]("Targets for scan successfully discovered"), | ||
Summary: &models.ScanSummary{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need to define the summary again if it is not changed?
No description provided.