infrastructure capa

infrastructure-search-console

Typed Google Search Console searchanalytics.query client (read-only)

Typed Google Search Console searchanalytics.query client (read-only)

Tierinfrastructure
Roleunclassified (baselined)
Pathcrates/infrastructure/search-console
Edition2021
Targetsinfrastructure_search_console, search_console
Public items0 across 0 modules
Tests5

What it is for

Typed Google Search Console client.

A read-only client for the searchanalytics.query endpoint — the caller supplies a property, a date range, and dimensions and gets typed rows back (clicks, impressions, CTR, average position). Authentication is delegated to infrastructure_google_auth; the scope is fixed to webmasters.readonly (least privilege — no write operations).

# Example

use infrastructure_search_console::{Client, Dimension, QueryRequest, ServiceAccountKey};
use chrono::NaiveDate;

let key = ServiceAccountKey::from_file("/path/to/service-account.json")?;
let mut sc = Client::new(key);
let req = QueryRequest::new(
"sc-domain:example.com",
NaiveDate::from_ymd_opt(2026, 5, 14).unwrap_or_default(),
NaiveDate::from_ymd_opt(2026, 5, 20).unwrap_or_default(),
)
.dimensions(&Dimension::Date, Dimension::Query);
let rows = sc.query(&req).await?;
# Ok::<(), infrastructure_search_console::SearchConsoleError>(())

Capabilities

No public items.

How to use it

From this crate's own rustdoc:

use infrastructure_search_console::{Client, Dimension, QueryRequest, ServiceAccountKey};
use chrono::NaiveDate;

let key = ServiceAccountKey::from_file("/path/to/service-account.json")?;
let mut sc = Client::new(key);
let req = QueryRequest::new(
        "sc-domain:example.com",
        NaiveDate::from_ymd_opt(2026, 5, 14).unwrap_or_default(),
        NaiveDate::from_ymd_opt(2026, 5, 20).unwrap_or_default(),
    )
    .dimensions(&[Dimension::Date, Dimension::Query]);
let rows = sc.query(&req).await?;
# Ok::<(), infrastructure_search_console::SearchConsoleError>(())

Module structure

No public modules: the crate root is its whole surface.

Public surface

No public items.

Re-exports. Exported here, defined elsewhere.

ExportDefined in
SearchConsoleErrorerror::SearchConsoleError
{Client,SCOPE}client::{Client,SCOPE}
{Dimension,QueryRequest,QueryRow,MAX_ROW_LIMIT}models::{Dimension,QueryRequest,QueryRow,MAX_ROW_LIMIT}
{GoogleAuthError,OAuthCredentials,ServiceAccountKey}infrastructure_google_auth::{GoogleAuthError,OAuthCredentials,ServiceAccountKey}

Boundary

Depends on no other workspace tier.

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/search-console
Vocabulary in force (lexicon)current

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`infrastructure-google-auth`infrastructurenoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
chrono^0.4serdenoalways
reqwest^0.12json, rustls-tlsnoalways
serde^1derivenoalways
serde_json^1noalways
thiserror^2noalways
tracing^0.1noalways

Development, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
tokio^1fullnoalways
wiremock^0.6noalways

Build. None.

Depended on by. 1 workspace crate.

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

flowchart LR
  n_application_search_console["application-search-console"] -->|uses| SELF
  SELF["infrastructure-search-console"]
  SELF -->|runtime| n_infrastructure_google_auth["infrastructure-google-auth"]
  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_search_console`src/lib.rs`
testsearch_console`tests/search_console.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 surfacenone detected
async runtimenone detected
database accessnone detected
network I/Oyes
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.

1 workspace crate depends on this one: application-search-console.

Verification

KindCount
Unit tests0
Integration tests5
Examples0
Doctests1

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc00
Public modules with a //! block00

Metrics

MetricValue
Rust source files4
Source lines380
Code lines207
Public API items0
Public modules0
Tests5
Examples0
Cargo features0
Direct runtime dependencies7
Workspace reverse dependencies1
pie showData
    title Rust source composition
    "Code" : 207
    "Blank or comment" : 173

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