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

Function build_client

atomic-cli/src/commands/client.rs:53–59  ·  view source on GitHub ↗

Build a [`StorageClient`] from global config and the resolved identity. - `org_override` — explicit `--org` flag value. - `server_override` — explicit `--server ` flag value; selects a named profile from `[servers.*]` in `~/.atomic/config.toml`. # Errors - Config not loaded or server not configured. - Named server profile not found. - No org slug available (neither override nor default).

(
    org_override: Option<&str>,
    server_override: Option<&str>,
)

Source from the content-addressed store, hash-verified

51/// - Identity store cannot be opened or no default identity set.
52/// - HTTP client construction failure.
53pub async fn build_client(
54 org_override: Option<&str>,
55 server_override: Option<&str>,
56) -> CliResult<StorageClient> {
57 let (client, _org_slug) = build_client_with_org(org_override, server_override).await?;
58 Ok(client)
59}
60
61/// Build a [`StorageClient`] and return the resolved org slug alongside it.
62///

Callers 15

runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
executeMethod · 0.85
executeMethod · 0.85
executeMethod · 0.85
executeMethod · 0.85
executeMethod · 0.85

Calls 1

build_client_with_orgFunction · 0.85

Tested by

no test coverage detected