MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / list_domains

Function list_domains

atomic-teams/src/domain.rs:22–31  ·  view source on GitHub ↗

List all domain aliases claimed by an organization. # Errors Returns [`TeamsError::OrgNotFound`] if the organization does not exist, or [`TeamsError::Remote`] on transport failure. [`TeamsError::OrgNotFound`]: crate::error::TeamsError::OrgNotFound [`TeamsError::Remote`]: crate::error::TeamsError::Remote

(
    client: &StorageClient,
    org_slug: &str,
)

Source from the content-addressed store, hash-verified

20/// [`TeamsError::OrgNotFound`]: crate::error::TeamsError::OrgNotFound
21/// [`TeamsError::Remote`]: crate::error::TeamsError::Remote
22pub async fn list_domains(
23 client: &StorageClient,
24 org_slug: &str,
25) -> TeamsResult<Vec<DomainAliasInfo>> {
26 let path = format!("/orgs/{org_slug}/domains");
27 client
28 .get(&path)
29 .await
30 .map_err(|e| map_remote_error(e, format!("org {org_slug}")))
31}
32
33/// Claim a new domain alias for an organization.
34///

Callers

nothing calls this directly

Calls 2

map_remote_errorFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected