Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BrowserNavigator ¶
type BrowserNavigator interface {
}
BrowserNavigator is the minimal browser contract used by fpcheck runner.
type Detection ¶
type Detection struct {
Detected bool `json:"detected"`
Description string `json:"description"`
Severity string `json:"severity,omitempty"`
Numeric *float64 `json:"numeric,omitempty"`
}
Detection represents a single anti-bot signal verdict from a detector page.
type Detector ¶
type Detector interface {
Name() string
URL() string
Extract(ctx context.Context, page *rod.Page) (map[string]Detection, string, error)
}
Detector knows how to extract normalized anti-bot verdicts from one site.
type Report ¶
type Report struct {
DetectorName string `json:"detector_name"`
URL string `json:"url"`
CapturedAtUTC string `json:"captured_at_utc"`
Screenshot string `json:"screenshot_path"`
Detections map[string]Detection `json:"detections"`
Summary Summary `json:"summary"`
RawNotes string `json:"raw_notes,omitempty"`
}
Report is the normalized output for one detector run.
func Run ¶
func Run(ctx context.Context, browser BrowserNavigator, detector Detector, artifactDir string) (Report, error)
Run navigates the given browser to detector URL, extracts verdicts, captures a screenshot artifact, and returns a normalized report.
func RunWithOptions ¶
func RunWithOptions(ctx context.Context, browser BrowserNavigator, detector Detector, options RunOptions) (Report, error)
RunWithOptions navigates the given browser to detector URL, extracts verdicts, captures a screenshot artifact, optionally waits, and returns a normalized report.
type RunOptions ¶
RunOptions controls detector run behavior.
Click to show internal directories.
Click to hide internal directories.