diff options
| author | s <[email protected]> | 2025-11-03 21:17:12 -0500 |
|---|---|---|
| committer | s <[email protected]> | 2025-11-03 21:17:12 -0500 |
| commit | f7fcfa623e670dc533bb378912829c73a3593e63 (patch) | |
| tree | 910119ff7293b407affa9ff34706d627d77a3a04 /internal/models | |
| download | dborg-f7fcfa623e670dc533bb378912829c73a3593e63.tar.gz dborg-f7fcfa623e670dc533bb378912829c73a3593e63.zip | |
hi
Diffstat (limited to 'internal/models')
| -rw-r--r-- | internal/models/admin.go | 43 | ||||
| -rw-r--r-- | internal/models/npd.go | 42 | ||||
| -rw-r--r-- | internal/models/osint.go | 29 | ||||
| -rw-r--r-- | internal/models/skiptrace.go | 92 | ||||
| -rw-r--r-- | internal/models/sl.go | 23 | ||||
| -rw-r--r-- | internal/models/usrsx.go | 33 | ||||
| -rw-r--r-- | internal/models/x.go | 22 |
7 files changed, 284 insertions, 0 deletions
diff --git a/internal/models/admin.go b/internal/models/admin.go new file mode 100644 index 0000000..5cf0f37 --- /dev/null +++ b/internal/models/admin.go @@ -0,0 +1,43 @@ +package models + +type Account struct { + APIKey string `json:"api_key"` + Name string `json:"name"` + Credits int `json:"credits"` + Unlimited bool `json:"unlimited"` + Disabled bool `json:"disabled"` + IsPremium bool `json:"is_premium"` + CreatedAt interface{} `json:"created_at,omitempty"` +} + +type AccountCreateRequest struct { + Name string `json:"name"` + Credits int `json:"credits,omitempty"` + Unlimited bool `json:"unlimited,omitempty"` + IsPremium bool `json:"is_premium,omitempty"` +} + +type AccountUpdateRequest struct { + Credits int `json:"credits,omitempty"` + Disabled bool `json:"disabled"` +} + +type AddCreditsRequest struct { + Credits int `json:"credits"` +} + +type SetCreditsRequest struct { + Credits int `json:"credits"` +} + +type DisableAccountRequest struct { + Disabled bool `json:"disabled"` +} + +type AdminResponse struct { + Success bool `json:"success,omitempty"` + Message string `json:"message,omitempty"` + Error string `json:"error,omitempty"` + Account *Account `json:"account,omitempty"` + Accounts []Account `json:"accounts,omitempty"` +} diff --git a/internal/models/npd.go b/internal/models/npd.go new file mode 100644 index 0000000..a1da05e --- /dev/null +++ b/internal/models/npd.go @@ -0,0 +1,42 @@ +package models + +type NPDParams struct { + ID string `json:"id,omitempty"` + FirstName string `json:"firstname,omitempty"` + LastName string `json:"lastname,omitempty"` + MiddleName string `json:"middlename,omitempty"` + DOB string `json:"dob,omitempty"` + SSN string `json:"ssn,omitempty"` + Phone1 string `json:"phone1,omitempty"` + Address string `json:"address,omitempty"` + City string `json:"city,omitempty"` + State string `json:"st,omitempty"` + Zip string `json:"zip,omitempty"` + CountyName string `json:"county_name,omitempty"` + NameSuffix string `json:"name_suff,omitempty"` + AKA1FullName string `json:"aka1fullname,omitempty"` + AKA2FullName string `json:"aka2fullname,omitempty"` + AKA3FullName string `json:"aka3fullname,omitempty"` + Alt1DOB string `json:"alt1dob,omitempty"` + Alt2DOB string `json:"alt2dob,omitempty"` + Alt3DOB string `json:"alt3dob,omitempty"` + StartDate string `json:"startdat,omitempty"` + MaxHits int `json:"max_hits,omitempty"` + SortBy string `json:"sort_by,omitempty"` +} + +type NPDResponse struct { + MaxHits int `json:"max_hits"` + Results struct { + ElapsedTimeMicros int `json:"elapsed_time_micros"` + Errors []string `json:"errors"` + Hits []map[string]any `json:"hits"` + NumHits int `json:"num_hits"` + } `json:"results"` + Credits struct { + Remaining int `json:"remaining"` + Unlimited bool `json:"unlimited"` + } `json:"credits"` + Message string `json:"message,omitempty"` + Error string `json:"error,omitempty"` +} diff --git a/internal/models/osint.go b/internal/models/osint.go new file mode 100644 index 0000000..7170c27 --- /dev/null +++ b/internal/models/osint.go @@ -0,0 +1,29 @@ +package models + +type BSSIDParams struct { + BSSID string + All bool + Map 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"` + MapURL string `json:"map_url,omitempty"` +} + +type BSSIDLookupResponse struct { + BSSID string `json:"bssid"` + Results []BSSIDResult `json:"results"` + MapURL string `json:"map_url,omitempty"` +} + +type ErrorResponse struct { + Error string `json:"error"` +} diff --git a/internal/models/skiptrace.go b/internal/models/skiptrace.go new file mode 100644 index 0000000..c87fe72 --- /dev/null +++ b/internal/models/skiptrace.go @@ -0,0 +1,92 @@ +package models + +import "encoding/json" + +type SkiptraceParams struct { + FirstName string `json:"first_name"` + LastName string `json:"last_name"` + City string `json:"city,omitempty"` + State string `json:"state,omitempty"` + Age string `json:"age,omitempty"` +} + +type SkiptraceResponse struct { + Data map[string]interface{} `json:"-"` + SXKey string `json:"sx_key,omitempty"` + Message string `json:"message,omitempty"` + Error string `json:"error,omitempty"` +} + +func (s *SkiptraceResponse) UnmarshalJSON(data []byte) error { + type Alias SkiptraceResponse + aux := &struct { + *Alias + }{ + Alias: (*Alias)(s), + } + if err := json.Unmarshal(data, &aux); err != nil { + return err + } + s.Data = make(map[string]interface{}) + return json.Unmarshal(data, &s.Data) +} + +type SkiptraceReportResponse struct { + Data map[string]interface{} `json:"-"` + Message string `json:"message,omitempty"` + Error string `json:"error,omitempty"` +} + +func (s *SkiptraceReportResponse) UnmarshalJSON(data []byte) error { + type Alias SkiptraceReportResponse + aux := &struct { + *Alias + }{ + Alias: (*Alias)(s), + } + if err := json.Unmarshal(data, &aux); err != nil { + return err + } + s.Data = make(map[string]interface{}) + return json.Unmarshal(data, &s.Data) +} + +type SkiptracePhoneResponse struct { + Data map[string]interface{} `json:"-"` + Message string `json:"message,omitempty"` + Error string `json:"error,omitempty"` +} + +func (s *SkiptracePhoneResponse) UnmarshalJSON(data []byte) error { + type Alias SkiptracePhoneResponse + aux := &struct { + *Alias + }{ + Alias: (*Alias)(s), + } + if err := json.Unmarshal(data, &aux); err != nil { + return err + } + s.Data = make(map[string]interface{}) + return json.Unmarshal(data, &s.Data) +} + +type SkiptraceEmailResponse struct { + Data map[string]interface{} `json:"-"` + Message string `json:"message,omitempty"` + Error string `json:"error,omitempty"` +} + +func (s *SkiptraceEmailResponse) UnmarshalJSON(data []byte) error { + type Alias SkiptraceEmailResponse + aux := &struct { + *Alias + }{ + Alias: (*Alias)(s), + } + if err := json.Unmarshal(data, &aux); err != nil { + return err + } + s.Data = make(map[string]interface{}) + return json.Unmarshal(data, &s.Data) +} diff --git a/internal/models/sl.go b/internal/models/sl.go new file mode 100644 index 0000000..d55279f --- /dev/null +++ b/internal/models/sl.go @@ -0,0 +1,23 @@ +package models + +type SLParams struct { + Query string `json:"query"` + MaxHits int `json:"max_hits,omitempty"` + SortBy string `json:"sort_by,omitempty"` + IngestStartDate string `json:"ingest_start_date,omitempty"` + IngestEndDate string `json:"ingest_end_date,omitempty"` + PostedStartDate string `json:"posted_start_date,omitempty"` + PostedEndDate string `json:"posted_end_date,omitempty"` + Format string `json:"format,omitempty"` +} + +type SLResponse struct { + MaxHits int `json:"max_hits"` + Results interface{} `json:"results"` + Credits struct { + Remaining int `json:"remaining"` + Unlimited bool `json:"unlimited"` + } `json:"credits"` + Message string `json:"message,omitempty"` + Error string `json:"error,omitempty"` +} diff --git a/internal/models/usrsx.go b/internal/models/usrsx.go new file mode 100644 index 0000000..f9264be --- /dev/null +++ b/internal/models/usrsx.go @@ -0,0 +1,33 @@ +package models + +type USRSXParams struct { + Username string `json:"username"` + Sites []string `json:"sites,omitempty"` + Fuzzy bool `json:"fuzzy,omitempty"` + MaxTasks int `json:"max_tasks,omitempty"` +} + +type USRSXResponse struct { + Username string `json:"username"` + Results []SiteResult `json:"results"` + Credits struct { + Remaining int `json:"remaining"` + Unlimited bool `json:"unlimited"` + } `json:"credits"` + Message string `json:"message,omitempty"` + Error string `json:"error,omitempty"` +} + +type SiteResult struct { + SiteName string `json:"site_name"` + Username string `json:"username"` + URL string `json:"url"` + Status string `json:"status"` + ResponseCode int `json:"response_code"` + Category string `json:"category,omitempty"` + Timestamp string `json:"timestamp,omitempty"` + Type string `json:"type,omitempty"` + Elapsed float64 `json:"elapsed,omitempty"` + Error string `json:"error,omitempty"` + Metadata map[string]interface{} `json:"metadata,omitempty"` +} diff --git a/internal/models/x.go b/internal/models/x.go new file mode 100644 index 0000000..f8c7a70 --- /dev/null +++ b/internal/models/x.go @@ -0,0 +1,22 @@ +package models + +type XResponse struct { + Username string `json:"username,omitempty"` + PreviousUsernames []UserHistory `json:"previous_usernames,omitempty"` + + Query string `json:"query,omitempty"` + Response string `json:"response,omitempty"` + Data interface{} `json:"data,omitempty"` + + Credits struct { + Remaining int `json:"remaining"` + Unlimited bool `json:"unlimited"` + } `json:"credits"` + Message string `json:"message,omitempty"` + Error string `json:"error,omitempty"` +} + +type UserHistory struct { + Username string `json:"username"` + TimeAgo string `json:"time_ago"` +} |
