feat: human-readable scan_id from UTC time + request CIDRs + short random suffix
Made-with: Cursor
This commit is contained in:
@@ -24,12 +24,13 @@ func NewPostgresStore(db *sql.DB) *PostgresStore {
|
||||
}
|
||||
|
||||
func (s *PostgresStore) CreateScan(req CreateScanRequest) (ScanJob, error) {
|
||||
cidrSnapshot := append([]string(nil), req.CIDRs...)
|
||||
if err := validateCreateScanRequest(&req); err != nil {
|
||||
return ScanJob{}, err
|
||||
}
|
||||
applyDefaultOptions(&req.Options)
|
||||
|
||||
id, err := newID()
|
||||
id, err := newScanID(cidrSnapshot)
|
||||
if err != nil {
|
||||
return ScanJob{}, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user