infrastructure capa

infrastructure-web-backlink-finder

Backlink discovery/classification implementing foundation-web-analysis::Analyzer -- Bing/DuckDuckGo search-result parsing, directory/review/social/forum/editorial link-type classification, and a per-domain backlink summary

Backlink discovery/classification implementing foundation-web-analysis::Analyzer -- Bing/DuckDuckGo search-result parsing, directory/review/social/forum/editorial link-type classification, and a per-domain backlink summary

Tierinfrastructure
Roleunclassified (baselined)
Pathcrates/infrastructure/web-backlink-finder
Edition2021
Targetsinfrastructure_web_backlink_finder
Public items29 across 2 modules
Tests43

What it is for

# infrastructure-web-backlink-finder

Backlink discovery/classification implementing foundation_web_analysis::Analyzer. Searches Bing and DuckDuckGo for pages linking to a target domain, classifies each discovered link (directory / review / social / forum / editorial / unknown) by its source domain, and produces a per-domain models::BacklinkSummary.

Lifted from plumber/src/analyzers/backlink_finder.rs and plumber/src/models/backlinks.rs (sprint 3.46, wave 2 -- see CHANGELOG.md for provenance).

Capabilities

finder (other)

Backlink discovery/classification analyzer.

Item
pub const DEFAULT_MAX_BYTES: usize

BacklinkFinder

Backlink discovery/classification analyzer.

Item
pub struct BacklinkFinder
BacklinkFinder :: fn new() -> std::result::Result <Self, infrastructure_fetcher::SafeHttpError>
BacklinkFinder :: fn with_max_bytes(mut self, max_bytes : usize) -> Self
BacklinkFinder :: fn with_delay_range(mut self, min_secs : u64, max_secs : u64) -> Self
BacklinkFinder :: fn with_search_bases(mut self, bing_base : & str, duckduckgo_base : & str) -> Self
BacklinkFinder :: fn default() -> Self
BacklinkFinder :: fn name(& self) -> & 'static str
BacklinkFinder :: async fn analyze(& self, organization_id : Uuid, website_url : & str) -> Result <AnalysisResult>
BacklinkFinder :: fn requires_link_graph(& self) -> bool
BacklinkFinder :: fn cache_ttl_days(& self) -> u32

Backlink

Backlink data model.

Item
pub struct Backlink
Backlink :: fn default() -> Self

BacklinkSummary

Backlink data model.

Item
pub struct BacklinkSummary
BacklinkSummary :: fn new(organization_id : Uuid) -> Self
BacklinkSummary :: fn dofollow_percentage(& self) -> f32
BacklinkSummary :: fn avg_links_per_domain(& self) -> f32

DirectorySites

Backlink data model.

Item
pub struct DirectorySites
DirectorySites :: fn is_directory(domain : & str) -> bool
DirectorySites :: fn known_directories() -> Vec <& 'static str>
DirectorySites :: fn is_review_site(domain : & str) -> bool
DirectorySites :: fn review_sites() -> Vec <& 'static str>
DirectorySites :: fn is_social_media(domain : & str) -> bool

DiscoverySource

Backlink data model.

Item
pub enum DiscoverySource
DiscoverySource :: fn fmt(& self, f : & mut std::fmt::Formatter <'_>) -> std::fmt::Result

DomainLinkCount

Backlink data model.

Item
pub struct DomainLinkCount

LinkType

Backlink data model.

Item
pub enum LinkType
LinkType :: fn fmt(& self, f : & mut std::fmt::Formatter <'_>) -> std::fmt::Result
LinkType :: fn from_str(s : & str) -> Result <Self, Self::Err>

How to use it

No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.

Module structure

infrastructure_web_backlink_finder

flowchart TD
  n_infrastructure_web_backlink_finder["infrastructure_web_backlink_finder"]
  n_infrastructure_web_backlink_finder --> n_finder["finder"]
  n_infrastructure_web_backlink_finder --> n_models["models"]

Public surface

`finder`

ItemWhat it is
pub const DEFAULT_MAX_BYTES: usizeResponse body byte cap for a fetched search-results page (Gate 1.5.6 input limit).
pub struct BacklinkFinderAnalyzer for finding backlinks via Bing and DuckDuckGo link: searches
BacklinkFinder :: fn new() -> std::result::Result <Self, infrastructure_fetcher::SafeHttpError>Build a finder with the default byte cap (DEFAULT_MAX_BYTES), timeout (infrastructure_fetcher::safe_http::DEFAULT_TIMEOUT, 30s), and inter-search delay range (30-60s, matching the source's own min_delay_secs/max_delay_secs defaults).
BacklinkFinder :: fn with_max_bytes(mut self, max_bytes : usize) -> SelfOverride the response body byte cap.
BacklinkFinder :: fn with_delay_range(mut self, min_secs : u64, max_secs : u64) -> SelfOverride the inter-search delay range, in seconds.
BacklinkFinder :: fn with_search_bases(mut self, bing_base : & str, duckduckgo_base : & str) -> SelfOverride the search-endpoint base URLs
BacklinkFinder :: fn default() -> Self# Panics Panics if the underlying SafeHttpClient cannot be built (TLS backend init failure) -- matches the source's expect-on-construction posture (Client::builder()...expect("Failed to build HTTP client")).
BacklinkFinder :: fn name(& self) -> & 'static str
BacklinkFinder :: async fn analyze(& self, organization_id : Uuid, website_url : & str) -> Result <AnalysisResult>
BacklinkFinder :: fn requires_link_graph(& self) -> bool
BacklinkFinder :: fn cache_ttl_days(& self) -> u32

`models`

ItemWhat it is
pub struct BacklinkA single backlink discovered for an organization's website
Backlink :: fn default() -> Self
pub enum LinkTypeClassification of the linking relationship a Backlink represents.
LinkType :: fn fmt(& self, f : & mut std::fmt::Formatter <'_>) -> std::fmt::Result
LinkType :: fn from_str(s : & str) -> Result <Self, Self::Err>
pub enum DiscoverySourceWhere a Backlink was discovered.
DiscoverySource :: fn fmt(& self, f : & mut std::fmt::Formatter <'_>) -> std::fmt::Result
pub struct BacklinkSummaryAggregate backlink-profile summary for one organization's website.
pub struct DomainLinkCount
BacklinkSummary :: fn new(organization_id : Uuid) -> Self
BacklinkSummary :: fn dofollow_percentage(& self) -> f32Percentage (0.0-100.0) of backlinks that are dofollow
BacklinkSummary :: fn avg_links_per_domain(& self) -> f32Average backlinks per unique linking domain
pub struct DirectorySitesKnown business-directory / review / social-media domains used to classify a backlink's LinkType by its source domain.
DirectorySites :: fn is_directory(domain : & str) -> bool
DirectorySites :: fn known_directories() -> Vec <& 'static str>
DirectorySites :: fn is_review_site(domain : & str) -> bool
DirectorySites :: fn review_sites() -> Vec <& 'static str>
DirectorySites :: fn is_social_media(domain : & str) -> bool

Re-exports. Exported here, defined elsewhere.

ExportDefined in
{Backlink,BacklinkSummary,DirectorySites,DiscoverySource,DomainLinkCount,LinkType,}models::{Backlink,BacklinkSummary,DirectorySites,DiscoverySource,DomainLinkCount,LinkType,}
{BacklinkFinder,DEFAULT_MAX_BYTES}finder::{BacklinkFinder,DEFAULT_MAX_BYTES}

Boundary

Reaches into foundation.

Shares tier infrastructure with 82 other crates: infrastructure-acquire, infrastructure-adapters-google-calendar, infrastructure-adapters-google-gmail, infrastructure-adapters-google-places, infrastructure-adapters-google-trends, infrastructure-adapters-shodan, infrastructure-adapters-yelp, infrastructure-agent, … (82 total).

_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._

Where it sits

Tier (ontology)infrastructure
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/infrastructure/web-backlink-finder
Vocabulary in force (lexicon)current

Tier flow. Which tiers this crate's own edges cross.

flowchart LR
  n_infrastructure["infrastructure"] --> n_foundation["foundation"]

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`foundation-web-analysis`foundationnoalways
`infrastructure-fetcher`infrastructurenoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
async-trait^0.1noalways
chrono^0.4serdenoalways
rand^0.8noalways
scraper^0.20noalways
serde^1derivenoalways
serde_json^1noalways
thiserror^2noalways
tokio^1fullnoalways
tracing^0.1noalways
url^2noalways
urlencoding^2noalways
uuid^1v4, v7, serde, jsnoalways

Development, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
tokio^1full, full, test-utilnoalways
tokio-test^0.4noalways

Build. None.

Depended on by. Nothing in this workspace.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  SELF["infrastructure-web-backlink-finder"]
  SELF -->|runtime| n_foundation_web_analysis["foundation-web-analysis"]
  SELF -->|runtime| n_infrastructure_fetcher["infrastructure-fetcher"]
  classDef self fill:#1f883d,stroke:#1f883d,color:#fff;
  class SELF self;

Feature flags

No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.

Targets

KindNameSource
libinfrastructure_web_backlink_finder`src/lib.rs`

Error model

No public error type was detected: no public item declares a type named *Error, and no public signature returns one.

Operational characteristics

PropertyEvidence
async public surfaceyes
async runtimeyes
database accessnone detected
network I/Onone detected
unsafe codenone detected
environment variablesnone detected

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.

No workspace crate depends on this one.

Verification

KindCount
Unit tests43
Integration tests0
Examples0
Doctests0

Evidence by module. How often each public module is named by something executable.

ModuleTestsExamplesConsumers
finder200
models600

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc1429
Public modules with a //! block22
pie showData
    title Public items with rustdoc
    "Documented" : 14
    "No rustdoc detected" : 15

Metrics

MetricValue
Rust source files3
Source lines1330
Code lines1034
Public API items29
Public modules2
Tests43
Examples0
Cargo features0
Direct runtime dependencies14
Workspace reverse dependencies0
pie showData
    title Public API by kind
    "constant" : 1
    "enum" : 2
    "method" : 21
    "struct" : 5
pie showData
    title Rust source composition
    "Code" : 1034
    "Blank or comment" : 296

Generation

Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.

Todas las infrastructure · Manual