Documentation
¶
Overview ¶
Package handlers contains all API endpoint handlers. Each handler follows the same pattern:
- Parse the request
- Do the work (run a command, call an API, etc.)
- Deduct sats
- Return JSON response
Index ¶
- type AIChatMessage
- type AIChatRequest
- type AIChatResponse
- type AIChatUsage
- type AITranslateRequest
- type AITranslateResponse
- type APIResponse
- type AXFRCheckRequest
- type AXFRCheckResponse
- type AdminOverviewResponse
- type AdminTrafficPath
- type AdminTrafficReport
- type AdminTrafficSource
- type BTCFearGreed
- type BTCMarketStats
- type BTCPriceResponse
- type BarkSessionResponse
- type BitcoinAddressBalance
- type BitcoinAddressRequest
- type BitcoinAddressResponse
- type BitcoinNewsItem
- type BitcoinNewsRequest
- type BitcoinNewsResponse
- type CVELookupRequest
- type CVELookupResponse
- type CVESearchItem
- type CVESearchRequest
- type CVESearchResponse
- type DKIMResult
- type DNSRecord
- type DNSRequest
- type DNSResponse
- type DomainCheckRequest
- type DomainCheckResponse
- type DomainHostIntel
- type DomainIntelCacheMetadata
- type DomainIntelRequest
- type DomainIntelResponse
- type DomainNetworkSummary
- type DomainProviderSummary
- type DomainRegistrationInfo
- type EmailAuthCheckRequest
- type EmailAuthCheckResponse
- type EmailAuthRecord
- type FundingInfo
- type GeoReaders
- type HTTPBehaviorResponse
- type Handler
- func (h *Handler) AIChat(w http.ResponseWriter, r *http.Request)
- func (h *Handler) AITranslate(w http.ResponseWriter, r *http.Request)
- func (h *Handler) AXFRCheck(w http.ResponseWriter, r *http.Request)
- func (h *Handler) AdminOverview(w http.ResponseWriter, r *http.Request)
- func (h *Handler) BTCPrice(w http.ResponseWriter, r *http.Request)
- func (h *Handler) BalanceCheck(w http.ResponseWriter, r *http.Request)
- func (h *Handler) BitcoinAddressValidate(w http.ResponseWriter, r *http.Request)
- func (h *Handler) BitcoinNews(w http.ResponseWriter, r *http.Request)
- func (h *Handler) CVELookup(w http.ResponseWriter, r *http.Request)
- func (h *Handler) CVESearch(w http.ResponseWriter, r *http.Request)
- func (h *Handler) CreateSession(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DNSLookup(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DomainCheck(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DomainIntel(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DownloadImage(w http.ResponseWriter, r *http.Request)
- func (h *Handler) EmailAuthCheck(w http.ResponseWriter, r *http.Request)
- func (h *Handler) HashCrack(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Headers(w http.ResponseWriter, r *http.Request)
- func (h *Handler) IPAbuseCheck(w http.ResponseWriter, r *http.Request)
- func (h *Handler) IPIntel(w http.ResponseWriter, r *http.Request)
- func (h *Handler) IPLookup(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ImageGenerate(w http.ResponseWriter, r *http.Request)
- func (h *Handler) PasteCreate(w http.ResponseWriter, r *http.Request)
- func (h *Handler) PasteGet(w http.ResponseWriter, r *http.Request)
- func (h *Handler) PredictionMarketSearch(w http.ResponseWriter, r *http.Request)
- func (h *Handler) QRGenerate(w http.ResponseWriter, r *http.Request)
- func (h *Handler) RemoteJobSearch(w http.ResponseWriter, r *http.Request)
- func (h *Handler) SSLCheck(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Screenshot(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Translate(w http.ResponseWriter, r *http.Request)
- func (h *Handler) URLToMarkdown(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Weather(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Whois(w http.ResponseWriter, r *http.Request)
- type HashCrackRequest
- type HashCrackResponse
- type HeadersRequest
- type HeadersResponse
- type IPAbuseCheckRequest
- type IPAbuseCheckResponse
- type IPAbuseContact
- type IPIntelRequest
- type IPIntelResponse
- type IPRequest
- type IPResponse
- type IPURLhausHostSummary
- type ImageGenerateRequest
- type ImageGenerateResponse
- type LocationInfo
- type MarkdownRequest
- type MarkdownResponse
- type PasteCreateRequest
- type PasteCreateResponse
- type PasteReadResponse
- type PredictionMarketSearchRequest
- type PredictionMarketSearchResponse
- type PredictionMarketSearchResult
- type QRRequest
- type QRResponse
- type RemoteJobSearchEntry
- type RemoteJobSearchResponse
- type RobotsTXTResponse
- type SSLRequest
- type SSLResponse
- type ScreenshotRequest
- type ScreenshotResponse
- type SecurityHeader
- type SecurityTXTResponse
- type SessionRequest
- type SessionResponse
- type TechFingerprintResponse
- type TranslateRequest
- type TranslateResponse
- type WeatherRequest
- type WeatherResponse
- type WhoisRequest
- type WhoisResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AIChatMessage ¶
type AIChatRequest ¶
type AIChatRequest struct {
Prompt string `json:"prompt,omitempty"`
SystemPrompt string `json:"system_prompt,omitempty"`
Messages []AIChatMessage `json:"messages,omitempty"`
}
type AIChatResponse ¶
type AIChatResponse struct {
Answer string `json:"answer"`
Model string `json:"model"`
Usage *AIChatUsage `json:"usage,omitempty"`
}
type AIChatUsage ¶
type AITranslateRequest ¶
type AITranslateResponse ¶
type AITranslateResponse struct {
Text string `json:"text"`
TranslatedText string `json:"translated_text"`
TargetLanguage string `json:"target_language"`
SourceLanguage string `json:"source_language"`
DetectedLanguage string `json:"detected_language,omitempty"`
Style string `json:"style"`
Model string `json:"model"`
Usage *AIChatUsage `json:"usage,omitempty"`
}
type APIResponse ¶
type APIResponse struct {
Success bool `json:"success"`
Data interface{} `json:"data,omitempty"`
Error string `json:"error,omitempty"`
CostSats int `json:"cost_sats"`
BalanceRemaining int64 `json:"balance_remaining"`
ResponseMs int `json:"response_ms"`
Endpoint string `json:"endpoint"`
}
APIResponse is the standard response wrapper for all endpoints
type AXFRCheckRequest ¶
type AXFRCheckRequest struct {
Domain string `json:"domain"`
}
type AXFRCheckResponse ¶
type AXFRCheckResponse struct {
Domain string `json:"domain"`
Allowed bool `json:"allowed"`
Explanation string `json:"explanation"`
NameserversChecked []string `json:"nameservers_checked"`
SuccessfulNameserver string `json:"successful_nameserver,omitempty"`
TransferRecordCount int `json:"transfer_record_count"`
Truncated bool `json:"truncated,omitempty"`
Records map[string][]DNSRecord `json:"records,omitempty"`
}
type AdminOverviewResponse ¶
type AdminTrafficPath ¶
type AdminTrafficReport ¶
type AdminTrafficReport struct {
WindowHours int `json:"window_hours"`
TotalRequests int64 `json:"total_requests"`
ExternalRequests int64 `json:"external_requests"`
UniqueIPs int `json:"unique_ips"`
ExternalIPs int `json:"external_ips"`
PageHits int64 `json:"page_hits"`
CrawlerRequests int64 `json:"crawler_requests"`
TopPaths []AdminTrafficPath `json:"top_paths"`
TopSources []AdminTrafficSource `json:"top_sources"`
}
type AdminTrafficSource ¶
type BTCFearGreed ¶
type BTCMarketStats ¶
type BTCMarketStats struct {
Rank int `json:"rank"`
Change1hPct float64 `json:"change_1h_pct"`
Change24hPct float64 `json:"change_24h_pct"`
Change7dPct float64 `json:"change_7d_pct"`
Volume24hUSD float64 `json:"volume_24h_usd"`
MarketCapUSD float64 `json:"market_cap_usd"`
Source string `json:"source"`
}
type BTCPriceResponse ¶
type BTCPriceResponse struct {
BTCUSD string `json:"btc_usd"`
BTCEUR string `json:"btc_eur"`
BTCGBP string `json:"btc_gbp"`
BTCCAD string `json:"btc_cad"`
BTCJPY string `json:"btc_jpy"`
BTCAUD string `json:"btc_aud"`
BTCCHF string `json:"btc_chf"`
BTCCNY string `json:"btc_cny"`
BTCHKD string `json:"btc_hkd"`
BTCSGD string `json:"btc_sgd"`
MarketStats *BTCMarketStats `json:"market_stats,omitempty"`
FearGreed *BTCFearGreed `json:"fear_greed,omitempty"`
UpdatedAt time.Time `json:"updated_at"`
}
BTCPriceResponse is what we return
type BarkSessionResponse ¶
type BarkSessionResponse struct {
Token string `json:"token"`
Funding FundingInfo `json:"funding"`
AmountSats int64 `json:"amount_sats"`
BalanceSats int64 `json:"balance_sats"`
Status string `json:"status"`
ExpiresIn int `json:"expires_in"`
}
BarkSessionResponse is returned when creating a session in bark mode
type BitcoinAddressBalance ¶
type BitcoinAddressBalance struct {
ConfirmedSats int64 `json:"confirmed_sats"`
UnconfirmedSats int64 `json:"unconfirmed_sats"`
TxCount int `json:"tx_count"`
}
BitcoinAddressBalance holds on-chain balance data
type BitcoinAddressRequest ¶
type BitcoinAddressRequest struct {
Address string `json:"address"`
}
BitcoinAddressRequest is what the consumer sends
type BitcoinAddressResponse ¶
type BitcoinAddressResponse struct {
Address string `json:"address"`
Valid bool `json:"valid"`
Type string `json:"type,omitempty"`
Network string `json:"network,omitempty"`
Format string `json:"format,omitempty"`
Description string `json:"description,omitempty"`
Balance *BitcoinAddressBalance `json:"balance"`
Cached bool `json:"cached"`
}
BitcoinAddressResponse is what we return
type BitcoinNewsItem ¶
type BitcoinNewsRequest ¶
type BitcoinNewsRequest struct {
Limit int `json:"limit,omitempty"`
}
type BitcoinNewsResponse ¶
type BitcoinNewsResponse struct {
Items []BitcoinNewsItem `json:"items"`
}
type CVELookupRequest ¶
type CVELookupRequest struct {
CVE string `json:"cve"`
}
type CVELookupResponse ¶
type CVELookupResponse struct {
CVEID string `json:"cve_id"`
Found bool `json:"found"`
Source string `json:"source"`
NVDURL string `json:"nvd_url,omitempty"`
PrimaryReferenceURL string `json:"primary_reference_url,omitempty"`
Published string `json:"published,omitempty"`
LastModified string `json:"last_modified,omitempty"`
VulnerabilityStatus string `json:"vulnerability_status,omitempty"`
Description string `json:"description,omitempty"`
Severity string `json:"severity,omitempty"`
CVSSScore float64 `json:"cvss_score,omitempty"`
CVSSVector string `json:"cvss_vector,omitempty"`
CWEs []string `json:"cwes,omitempty"`
References []string `json:"references,omitempty"`
HasKEV bool `json:"has_kev"`
KEVAdded string `json:"kev_added,omitempty"`
RequiredAction string `json:"required_action,omitempty"`
}
type CVESearchItem ¶
type CVESearchItem struct {
CVEID string `json:"cve_id"`
NVDURL string `json:"nvd_url"`
PrimaryReferenceURL string `json:"primary_reference_url,omitempty"`
Published string `json:"published,omitempty"`
LastModified string `json:"last_modified,omitempty"`
Description string `json:"description,omitempty"`
Severity string `json:"severity,omitempty"`
CVSSScore float64 `json:"cvss_score,omitempty"`
HasKEV bool `json:"has_kev"`
}
type CVESearchRequest ¶
type CVESearchResponse ¶
type CVESearchResponse struct {
Query string `json:"query"`
Results []CVESearchItem `json:"results"`
}
type DKIMResult ¶
type DNSRecord ¶
type DNSRecord struct {
Name string `json:"name"`
TTL string `json:"ttl"`
Type string `json:"type"`
Value string `json:"value"`
}
DNSRecord is a single DNS record
type DNSRequest ¶
type DNSRequest struct {
Domain string `json:"domain"`
}
DNSRequest is what the consumer sends
type DNSResponse ¶
type DNSResponse struct {
Domain string `json:"domain"`
Records map[string][]DNSRecord `json:"records"`
Raw string `json:"raw,omitempty"`
}
DNSResponse is what we return
type DomainCheckRequest ¶
type DomainCheckRequest struct {
Domain string `json:"domain"`
}
DomainCheckRequest is what the consumer sends
type DomainCheckResponse ¶
type DomainCheckResponse struct {
Domain string `json:"domain"`
Available bool `json:"available"`
Registrar string `json:"registrar,omitempty"`
CreatedDate string `json:"created_date,omitempty"`
ExpiryDate string `json:"expiry_date,omitempty"`
NameServers []string `json:"name_servers,omitempty"`
}
DomainCheckResponse is the parsed domain availability data
type DomainHostIntel ¶
type DomainHostIntel struct {
Hostname string `json:"hostname"`
IPs []string `json:"ips,omitempty"`
ResolvedIPs []IPResponse `json:"resolved_ips,omitempty"`
}
type DomainIntelRequest ¶
type DomainIntelResponse ¶
type DomainIntelResponse struct {
Domain string `json:"domain"`
AISummary *AIChatResponse `json:"ai_summary,omitempty"`
Registration *DomainRegistrationInfo `json:"registration,omitempty"`
Providers *DomainProviderSummary `json:"providers,omitempty"`
Network *DomainNetworkSummary `json:"network,omitempty"`
NameServerIntel []DomainHostIntel `json:"nameserver_intel,omitempty"`
MailHostIntel []DomainHostIntel `json:"mail_host_intel,omitempty"`
Infrastructure []string `json:"infrastructure_observations,omitempty"`
SecurityTXT *SecurityTXTResponse `json:"security_txt,omitempty"`
RobotsTXT *RobotsTXTResponse `json:"robots_txt,omitempty"`
TechFingerprint *TechFingerprintResponse `json:"tech_fingerprint,omitempty"`
HTTPBehavior *HTTPBehaviorResponse `json:"http_behavior,omitempty"`
Subdomains []string `json:"subdomains,omitempty"`
CTSubdomains []string `json:"ct_subdomains,omitempty"`
Findings []string `json:"findings,omitempty"`
Recommendations []string `json:"recommendations,omitempty"`
Cache *DomainIntelCacheMetadata `json:"cache,omitempty"`
DNS *DNSResponse `json:"dns,omitempty"`
Whois *WhoisResponse `json:"whois,omitempty"`
SSL *SSLResponse `json:"ssl,omitempty"`
Headers *HeadersResponse `json:"headers,omitempty"`
EmailAuth *EmailAuthCheckResponse `json:"email_auth,omitempty"`
ResolvedIPs []IPResponse `json:"resolved_ips,omitempty"`
Errors map[string]string `json:"errors,omitempty"`
}
type DomainNetworkSummary ¶
type DomainProviderSummary ¶
type DomainProviderSummary struct {
Registrar string `json:"registrar,omitempty"`
DNSProvider string `json:"dns_provider,omitempty"`
MailProvider string `json:"mail_provider,omitempty"`
CDNProvider string `json:"cdn_provider,omitempty"`
HostingProvider string `json:"hosting_provider,omitempty"`
ProxyDetected bool `json:"proxy_detected,omitempty"`
BehindCloudflare bool `json:"behind_cloudflare,omitempty"`
}
type DomainRegistrationInfo ¶
type EmailAuthCheckRequest ¶
type EmailAuthCheckResponse ¶
type EmailAuthCheckResponse struct {
Domain string `json:"domain"`
Grade string `json:"grade"`
SPF EmailAuthRecord `json:"spf"`
DMARC EmailAuthRecord `json:"dmarc"`
DKIM DKIMResult `json:"dkim"`
Recommendations []string `json:"recommendations,omitempty"`
}
type EmailAuthRecord ¶
type FundingInfo ¶
type FundingInfo struct {
LightningInvoice string `json:"lightning_invoice"`
ArkAddress string `json:"ark_address"`
PaymentHash string `json:"payment_hash"`
}
FundingInfo contains payment details for the consumer
type GeoReaders ¶
GeoReaders holds opened DB-IP Lite/MMDB readers.
func OpenGeoDBs ¶
func OpenGeoDBs(cityPath, asnPath string) *GeoReaders
OpenGeoDBs opens the configured MMDB GeoIP databases. Returns nil readers for any file that doesn't exist (handler will return an error on lookup).
type HTTPBehaviorResponse ¶
type HTTPBehaviorResponse struct {
InitialURL string `json:"initial_url"`
FinalURL string `json:"final_url,omitempty"`
CanonicalHost string `json:"canonical_host,omitempty"`
RedirectCount int `json:"redirect_count"`
RedirectChain []string `json:"redirect_chain,omitempty"`
StatusChain []int `json:"status_chain,omitempty"`
HTTPSRedirect bool `json:"https_redirect,omitempty"`
WWWRedirect bool `json:"www_redirect,omitempty"`
}
type Handler ¶
Handler wraps the database connection so all handlers can use it
func (*Handler) AITranslate ¶
func (h *Handler) AITranslate(w http.ResponseWriter, r *http.Request)
func (*Handler) AdminOverview ¶
func (h *Handler) AdminOverview(w http.ResponseWriter, r *http.Request)
func (*Handler) BTCPrice ¶
func (h *Handler) BTCPrice(w http.ResponseWriter, r *http.Request)
BTCPrice handles /api/btc-price Cost: 1 sat
func (*Handler) BalanceCheck ¶
func (h *Handler) BalanceCheck(w http.ResponseWriter, r *http.Request)
BalanceCheck handles GET /v1/balance
func (*Handler) BitcoinAddressValidate ¶
func (h *Handler) BitcoinAddressValidate(w http.ResponseWriter, r *http.Request)
BitcoinAddressValidate handles /api/bitcoin-address Cost: 3 sats
func (*Handler) BitcoinNews ¶
func (h *Handler) BitcoinNews(w http.ResponseWriter, r *http.Request)
func (*Handler) CreateSession ¶
func (h *Handler) CreateSession(w http.ResponseWriter, r *http.Request)
CreateSession handles POST /v1/sessions
func (*Handler) DNSLookup ¶
func (h *Handler) DNSLookup(w http.ResponseWriter, r *http.Request)
DNSLookup handles /api/dns-lookup Cost: 3 sats Runs: dig <domain> ANY +noall +answer
func (*Handler) DomainCheck ¶
func (h *Handler) DomainCheck(w http.ResponseWriter, r *http.Request)
DomainCheck handles /api/domain-check Cost: configurable (default 3 sats)
func (*Handler) DomainIntel ¶
func (h *Handler) DomainIntel(w http.ResponseWriter, r *http.Request)
func (*Handler) DownloadImage ¶
func (h *Handler) DownloadImage(w http.ResponseWriter, r *http.Request)
func (*Handler) EmailAuthCheck ¶
func (h *Handler) EmailAuthCheck(w http.ResponseWriter, r *http.Request)
func (*Handler) Headers ¶
func (h *Handler) Headers(w http.ResponseWriter, r *http.Request)
Headers handles /api/headers Cost: 3 sats
func (*Handler) IPAbuseCheck ¶
func (h *Handler) IPAbuseCheck(w http.ResponseWriter, r *http.Request)
func (*Handler) IPLookup ¶
func (h *Handler) IPLookup(w http.ResponseWriter, r *http.Request)
IPLookup handles /api/ip-lookup Cost: 3 sats Uses self-hosted MMDB GeoIP databases
func (*Handler) ImageGenerate ¶
func (h *Handler) ImageGenerate(w http.ResponseWriter, r *http.Request)
func (*Handler) PasteCreate ¶
func (h *Handler) PasteCreate(w http.ResponseWriter, r *http.Request)
func (*Handler) PredictionMarketSearch ¶
func (h *Handler) PredictionMarketSearch(w http.ResponseWriter, r *http.Request)
func (*Handler) QRGenerate ¶
func (h *Handler) QRGenerate(w http.ResponseWriter, r *http.Request)
QRGenerate handles /api/qr-generate Cost: 2 sats
func (*Handler) RemoteJobSearch ¶
func (h *Handler) RemoteJobSearch(w http.ResponseWriter, r *http.Request)
RemoteJobSearch handles /api/remote-job-search
func (*Handler) SSLCheck ¶
func (h *Handler) SSLCheck(w http.ResponseWriter, r *http.Request)
SSLCheck handles /api/ssl-check Cost: 5 sats Uses Go's native TLS library — no need to shell out to openssl
func (*Handler) Screenshot ¶
func (h *Handler) Screenshot(w http.ResponseWriter, r *http.Request)
func (*Handler) URLToMarkdown ¶
func (h *Handler) URLToMarkdown(w http.ResponseWriter, r *http.Request)
URLToMarkdown handles /api/url-to-markdown Cost: 5 sats
type HashCrackRequest ¶
type HashCrackResponse ¶
type HashCrackResponse struct {
Hash string `json:"hash"`
Type string `json:"type"`
Mode string `json:"mode"`
Engine string `json:"engine"`
Ruleset string `json:"ruleset"`
Cracked bool `json:"cracked"`
Plaintext string `json:"plaintext,omitempty"`
TimedOut bool `json:"timed_out,omitempty"`
ElapsedMs int `json:"elapsed_ms"`
}
type HeadersRequest ¶
type HeadersRequest struct {
URL string `json:"url"`
}
HeadersRequest is what the consumer sends
type HeadersResponse ¶
type HeadersResponse struct {
URL string `json:"url"`
StatusCode int `json:"status_code"`
Server string `json:"server,omitempty"`
SecurityHeaders []SecurityHeader `json:"security_headers"`
Score int `json:"score"` // 0-100
Grade string `json:"grade"` // A, B, C, D, F
AllHeaders map[string]string `json:"all_headers"`
}
HeadersResponse is the full analysis
type IPAbuseCheckRequest ¶
type IPAbuseCheckResponse ¶
type IPAbuseCheckResponse struct {
IP string `json:"ip"`
AbuseConfidenceScore int `json:"abuse_confidence_score"`
CountryCode string `json:"country_code,omitempty"`
UsageType string `json:"usage_type,omitempty"`
ISP string `json:"isp,omitempty"`
Domain string `json:"domain,omitempty"`
TotalReports int `json:"total_reports"`
NumDistinctUsers int `json:"num_distinct_users"`
LastReportedAt *time.Time `json:"last_reported_at,omitempty"`
IsWhitelisted bool `json:"is_whitelisted"`
Source string `json:"source"`
MaxAgeDays int `json:"max_age_days"`
}
type IPAbuseContact ¶
type IPAbuseContact struct {
Name string `json:"name,omitempty"`
Org string `json:"org,omitempty"`
Email string `json:"email,omitempty"`
Phone string `json:"phone,omitempty"`
Roles []string `json:"roles,omitempty"`
Source string `json:"source,omitempty"`
IsAbuseSpecific bool `json:"is_abuse_specific"`
}
type IPIntelRequest ¶
type IPIntelResponse ¶
type IPIntelResponse struct {
Lookup *IPResponse `json:"lookup"`
IP string `json:"ip"`
ReverseDNS []string `json:"reverse_dns,omitempty"`
ASNNumber int `json:"asn_number,omitempty"`
NetworkType string `json:"network_type,omitempty"`
ReportedRecently bool `json:"reported_recently"`
RiskLabel string `json:"risk_label"`
RiskReason string `json:"risk_reason"`
Abuse *IPAbuseCheckResponse `json:"abuse"`
URLhausHost *IPURLhausHostSummary `json:"urlhaus_host,omitempty"`
AbuseContact *IPAbuseContact `json:"abuse_contact,omitempty"`
AbuseReportNote string `json:"abuse_reporting_note,omitempty"`
}
type IPRequest ¶
type IPRequest struct {
IP string `json:"ip"`
}
IPRequest is what the consumer sends
type IPResponse ¶
type IPResponse struct {
IP string `json:"ip"`
Country string `json:"country"`
CountryCode string `json:"country_code"`
Region string `json:"region"`
City string `json:"city"`
ApproximateLocation string `json:"approximate_location,omitempty"`
Lat float64 `json:"lat"`
Lon float64 `json:"lon"`
GoogleMapsURL string `json:"google_maps_url,omitempty"`
ISP string `json:"isp"`
Org string `json:"org"`
AS string `json:"as"`
}
IPResponse is the geolocation data
type IPURLhausHostSummary ¶
type IPURLhausHostSummary struct {
Listed bool `json:"listed"`
FirstSeen string `json:"first_seen,omitempty"`
URLCount int `json:"url_count,omitempty"`
SpamhausDBL string `json:"spamhaus_dbl,omitempty"`
SURBL string `json:"surbl,omitempty"`
SampleThreats []string `json:"sample_threats,omitempty"`
SampleTags []string `json:"sample_tags,omitempty"`
Source string `json:"source"`
}
type ImageGenerateRequest ¶
type ImageGenerateRequest struct {
Prompt string `json:"prompt"`
}
type ImageGenerateResponse ¶
type LocationInfo ¶
type MarkdownRequest ¶
type MarkdownRequest struct {
URL string `json:"url"`
}
MarkdownRequest is what the consumer sends
type MarkdownResponse ¶
type MarkdownResponse struct {
URL string `json:"url"`
Title string `json:"title"`
Markdown string `json:"markdown"`
Excerpt string `json:"excerpt,omitempty"`
}
MarkdownResponse is what we return
type PasteCreateRequest ¶
type PasteCreateResponse ¶
type PasteCreateResponse struct {
ID string `json:"id"`
URL string `json:"url"`
ContentKind string `json:"content_kind"`
SizeBytes int `json:"size_bytes"`
TTLSeconds int `json:"ttl_seconds"`
BurnAfterRead bool `json:"burn_after_read"`
MaxViews *int `json:"max_views,omitempty"`
ViewsRemaining *int `json:"views_remaining,omitempty"`
ExpiresAt string `json:"expires_at"`
}
type PasteReadResponse ¶
type PasteReadResponse struct {
ID string `json:"id"`
ContentKind string `json:"content_kind"`
Content string `json:"content"`
SizeBytes int `json:"size_bytes"`
BurnAfterRead bool `json:"burn_after_read"`
MaxViews *int `json:"max_views,omitempty"`
ViewCount int `json:"view_count"`
ViewsRemaining *int `json:"views_remaining,omitempty"`
CreatedAt string `json:"created_at"`
ExpiresAt string `json:"expires_at"`
}
type PredictionMarketSearchResponse ¶
type PredictionMarketSearchResponse struct {
Query string `json:"query"`
Platform string `json:"platform"`
Results []PredictionMarketSearchResult `json:"results"`
}
type PredictionMarketSearchResult ¶
type PredictionMarketSearchResult struct {
MarketID string `json:"market_id"`
EventID string `json:"event_id,omitempty"`
Title string `json:"title"`
EventTitle string `json:"event_title,omitempty"`
Platform string `json:"platform"`
Status string `json:"status"`
Probability float64 `json:"probability,omitempty"`
VolumeUSD float64 `json:"volume_usd,omitempty"`
CloseTime string `json:"close_time,omitempty"`
URL string `json:"url,omitempty"`
}
type QRRequest ¶
type QRRequest struct {
Data string `json:"data"` // The text/URL to encode
Size int `json:"size,omitempty"` // Image size in pixels (default 256, max 1024)
}
QRRequest is what the consumer sends
type QRResponse ¶
type QRResponse struct {
Data string `json:"data"` // The input data echoed back
Format string `json:"format"` // "png"
Size int `json:"size"` // Actual size used
ImageB64 string `json:"image_b64"` // Base64-encoded PNG image
DataURI string `json:"data_uri"` // Ready-to-use data URI for <img src="">
}
QRResponse is what we return
type RemoteJobSearchEntry ¶
type RemoteJobSearchEntry struct {
ID int `json:"id"`
URL string `json:"url"`
Title string `json:"title"`
CompanyName string `json:"company_name"`
CompanyLogo string `json:"company_logo,omitempty"`
Category string `json:"category,omitempty"`
Tags []string `json:"tags,omitempty"`
JobType string `json:"job_type,omitempty"`
PublicationDate *time.Time `json:"publication_date,omitempty"`
CandidateRequiredLocation string `json:"candidate_required_location,omitempty"`
Salary string `json:"salary,omitempty"`
DescriptionText string `json:"description_text,omitempty"`
}
type RemoteJobSearchResponse ¶
type RemoteJobSearchResponse struct {
Search string `json:"search,omitempty"`
Category string `json:"category,omitempty"`
CompanyName string `json:"company_name,omitempty"`
Limit int `json:"limit"`
Source string `json:"source"`
ProviderNote string `json:"provider_note,omitempty"`
JobCount int `json:"job_count"`
TotalJobCount int `json:"total_job_count,omitempty"`
Jobs []RemoteJobSearchEntry `json:"jobs"`
}
type RobotsTXTResponse ¶
type RobotsTXTResponse struct {
Present bool `json:"present"`
SourceURL string `json:"source_url,omitempty"`
UserAgents []string `json:"user_agents,omitempty"`
Allow []string `json:"allow,omitempty"`
Disallow []string `json:"disallow,omitempty"`
Sitemaps []string `json:"sitemaps,omitempty"`
CrawlDelay string `json:"crawl_delay,omitempty"`
Host string `json:"host,omitempty"`
}
type SSLRequest ¶
type SSLRequest struct {
Domain string `json:"domain"`
Port int `json:"port,omitempty"` // defaults to 443
}
SSLRequest is what the consumer sends
type SSLResponse ¶
type SSLResponse struct {
Domain string `json:"domain"`
Valid bool `json:"valid"`
Issuer string `json:"issuer"`
Subject string `json:"subject"`
NotBefore string `json:"not_before"`
NotAfter string `json:"not_after"`
DaysRemaining int `json:"days_remaining"`
Protocol string `json:"protocol"`
CipherSuite string `json:"cipher_suite,omitempty"`
SANs []string `json:"sans,omitempty"`
Chain []string `json:"chain,omitempty"`
Expired bool `json:"expired"`
}
SSLResponse is the certificate analysis
type ScreenshotRequest ¶
type ScreenshotRequest struct {
URL string `json:"url"`
}
type ScreenshotResponse ¶
type SecurityHeader ¶
type SecurityHeader struct {
Header string `json:"header"`
Value string `json:"value"`
Present bool `json:"present"`
Rating string `json:"rating"` // "good", "warning", "bad", "info"
Note string `json:"note"`
}
SecurityHeader is a single header check result
type SecurityTXTResponse ¶
type SecurityTXTResponse struct {
Present bool `json:"present"`
SourceURL string `json:"source_url,omitempty"`
Canonical []string `json:"canonical,omitempty"`
Contacts []string `json:"contacts,omitempty"`
Emails []string `json:"emails,omitempty"`
Policy []string `json:"policy,omitempty"`
Hiring []string `json:"hiring,omitempty"`
Encryption []string `json:"encryption,omitempty"`
Acknowledgments []string `json:"acknowledgments,omitempty"`
PreferredLanguages []string `json:"preferred_languages,omitempty"`
CSAF []string `json:"csaf,omitempty"`
Expires string `json:"expires,omitempty"`
}
type SessionRequest ¶
type SessionRequest struct {
AmountSats int64 `json:"amount_sats,omitempty"`
}
SessionRequest is the optional body for session creation
type SessionResponse ¶
type SessionResponse struct {
Token string `json:"token"`
BalanceSats int64 `json:"balance_sats"`
Status string `json:"status"`
Message string `json:"message"`
}
SessionResponse is returned when creating a session in test mode
type TechFingerprintResponse ¶
type TechFingerprintResponse struct {
CMS string `json:"cms,omitempty"`
Frontend string `json:"frontend,omitempty"`
Ecommerce string `json:"ecommerce,omitempty"`
Generator string `json:"generator,omitempty"`
Server string `json:"server,omitempty"`
Detected []string `json:"detected,omitempty"`
FinalURL string `json:"final_url,omitempty"`
}
type TranslateRequest ¶
type TranslateResponse ¶
type TranslateResponse struct {
Text string `json:"text"`
TranslatedText string `json:"translated_text"`
TargetLanguage string `json:"target_language"`
SourceLanguage string `json:"source_language"`
DetectedLanguage string `json:"detected_language,omitempty"`
DetectedConfidence int `json:"detected_confidence,omitempty"`
}
type WeatherRequest ¶
type WeatherRequest struct {
Lat float64 `json:"lat"`
Lon float64 `json:"lon"`
City string `json:"city,omitempty"` // optional - we'll geocode it
}
WeatherRequest is what the consumer sends
type WeatherResponse ¶
type WeatherResponse struct {
Location LocationInfo `json:"location"`
Current interface{} `json:"current"`
Hourly interface{} `json:"hourly,omitempty"`
Daily interface{} `json:"daily,omitempty"`
}
WeatherResponse is the combined weather data
type WhoisRequest ¶
type WhoisRequest struct {
Domain string `json:"domain"`
}
WhoisRequest is what the consumer sends
type WhoisResponse ¶
type WhoisResponse struct {
Domain string `json:"domain"`
Registrar string `json:"registrar,omitempty"`
CreatedDate string `json:"created_date,omitempty"`
ExpiryDate string `json:"expiry_date,omitempty"`
UpdatedDate string `json:"updated_date,omitempty"`
NameServers []string `json:"name_servers,omitempty"`
Status []string `json:"status,omitempty"`
Parsed map[string]string `json:"parsed"`
}
WhoisResponse is the parsed WHOIS data
Source Files
¶
- admin.go
- ai_chat.go
- ai_translate.go
- axfr_check.go
- bitcoin_address.go
- bitcoin_news.go
- bitcoin_price.go
- cache_limits.go
- cve_lookup.go
- cve_search.go
- dns_lookup.go
- domain_check.go
- domain_intel.go
- email_auth_check.go
- handlers.go
- hash_crack.go
- headers.go
- image_generate.go
- ip_abuse_check.go
- ip_intel.go
- ip_lookup.go
- ip_rdap.go
- ip_urlhaus.go
- markdown.go
- paste.go
- prediction_market_search.go
- qr_generate.go
- remote_job_search.go
- screenshot.go
- session.go
- ssl_check.go
- translate.go
- weather.go
- whois.go