discoverroute

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractAnchorRoutes

func ExtractAnchorRoutes(doc *goquery.Document, baseURL string, routeCaptureConfig discover.DiscoverRouteConfig) ([]*discover.RouteDetails, []string, []string)

ExtractAnchorRoutes extracts WebRoutes from anchor (<a>) elements in the HTML document. Returns a slice of RouteDetails, a slice of URLs, and a slice of errors.

func ExtractBundleURLRoutes added in v0.0.248

func ExtractBundleURLRoutes(ctx context.Context, bundleURLs []string, baseURL string, routeCaptureConfig discover.DiscoverRouteConfig) ([]*discover.RouteDetails, []string, []string)

ExtractBundleURLRoutes processes a list of explicit JS bundle URLs and extracts routes from each. Returns a slice of RouteDetails, a slice of URLs, and a slice of errors.

func ExtractFormRoutes

func ExtractFormRoutes(doc *goquery.Document, baseURL string, routeCaptureConfig discover.DiscoverRouteConfig) ([]*discover.RouteDetails, []string, []string)

ExtractFormRoutes extracts WebRoutes from form elements in the HTML document It returns a slice of WebRoutes, a slice of URLs and a slice of errors ExtractFormRoutes extracts WebRoutes from form elements in the HTML document It returns a slice of WebRoutes, a slice of URLs and a slice of errors WebRoutes are merged to only return unique routes

func ExtractInlineScriptRoutes

func ExtractInlineScriptRoutes(ctx context.Context, doc *goquery.Document, url string, routeCaptureConfig discover.DiscoverRouteConfig) ([]*discover.RouteDetails, []string, []string)

ExtractInlineScriptRoutes finds inline JavaScript code within script tags, parses it, and extracts routes. Returns a slice of RouteDetails, a slice of URLs, and a slice of errors.

func ExtractLinkRoutes

func ExtractLinkRoutes(doc *goquery.Document, baseURL string, routeCaptureConfig discover.DiscoverRouteConfig) ([]*discover.RouteDetails, []string, []string)

ExtractLinkRoutes extracts WebRoutes from link (<link>) elements in the HTML document. Returns a slice of RouteDetails, a slice of URLs, and a slice of errors.

func ExtractNetworkRoutes

func ExtractNetworkRoutes(ctx context.Context, browser *headless.Requester, target string, scopeURL string, ignoreCrossDomainRoutes bool, ignoreCrossDomainStaticAssets bool, captureStaticAssets bool, verifyTLS bool) ([]*discover.RouteDetails, []string, []string)

ExtractNetworkRoutes uses a headless browser to capture network requests and extract route details from them. target is the page to navigate to (the per-page post-redirect URL); scopeURL is the scope anchor (config.Target) used to keep discovery tight to the original target. ignoreCrossDomainRoutes gates the scope of discovered routes; ignoreCrossDomainStaticAssets gates the scope of captured static assets — matching the HTML/JS extractors. Returns a slice of RouteDetails, a slice of URLs (static assets), and a slice of errors.

func ExtractScriptRoutes

func ExtractScriptRoutes(ctx context.Context, doc *goquery.Document, baseURL string, routeCaptureConfig discover.DiscoverRouteConfig) ([]*discover.RouteDetails, []string, []string)

ExtractScriptRoutes finds script elements with a src attribute, fetches the JavaScript data, parses it, and extracts routes. Returns a slice of RouteDetails, a slice of URLs, and a slice of errors.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL