From 8383a241fc3cf5b022c9c53f8f19690edf04177b Mon Sep 17 00:00:00 2001 From: s Date: Mon, 10 Nov 2025 15:22:32 -0500 Subject: refactor: restructure client modules and add config file support - Split large osint.go client into focused modules (bssid.go, breachforum.go, buckets.go, etc.) - Add config file support with init command for API key management - Remove api-key flag in favor of config file + env var fallback - Update API paths to remove /osint prefix - Add crawl endpoint streaming support - Improve error handling with 402 payment required status --- internal/models/osint.go | 101 ----------------------------------------------- 1 file changed, 101 deletions(-) delete mode 100644 internal/models/osint.go (limited to 'internal/models/osint.go') diff --git a/internal/models/osint.go b/internal/models/osint.go deleted file mode 100644 index 6c2774e..0000000 --- a/internal/models/osint.go +++ /dev/null @@ -1,101 +0,0 @@ -package models - -type BSSIDParams struct { - BSSID string - All bool - Google bool - OSM bool -} - -type LocationInfo struct { - Latitude float64 `json:"latitude"` - Longitude float64 `json:"longitude"` - Accuracy int `json:"accuracy"` -} - -type BSSIDResult struct { - BSSID string `json:"bssid"` - Location *LocationInfo `json:"location"` - GoogleMap string `json:"google_map,omitempty"` - OpenStreetMap string `json:"openstreetmap,omitempty"` -} - -type BSSIDLookupResponse []BSSIDResult - -type ErrorResponse struct { - Error string `json:"error"` -} - -type BreachForumSearchParams struct { - Search string - MaxHits int -} - -type BreachForumSearchResponse struct { - Query string `json:"query"` - MaxHits int `json:"max_hits"` - Results interface{} `json:"results"` -} - -type OpenDirectorySearchParams struct { - URL string - Filename string - Extension string - Exclude string - Size int - From int -} - -type OpenDirectorySearchResponse map[string]interface{} - -type BucketsSearchParams struct { - Limit int - Start int -} - -type BucketsFilesSearchParams struct { - Keywords string - Extensions string - Buckets string - Limit int - Start int -} - -type ShortlinksSearchParams struct { - Keywords string - Ext string - Order string - Direction string - Regexp bool - Limit int - Start int -} - -type CreditsInfo struct { - Remaining int `json:"remaining"` - Unlimited bool `json:"unlimited"` -} - -type BucketsSearchResponse struct { - Credits CreditsInfo `json:"credits"` - Results interface{} `json:"results"` -} - -type BucketsFilesSearchResponse struct { - Credits CreditsInfo `json:"credits"` - Results interface{} `json:"results"` -} - -type ShortlinksSearchResponse struct { - Credits CreditsInfo `json:"credits"` - Results interface{} `json:"results"` -} - -type GeoSearchParams struct { - Street string - City string - State string - Zip string -} - -type GeoSearchResponse map[string]interface{} -- cgit v1.2.3