Skip to main content

Module cloud_sources

Module cloud_sources 

Source
Expand description

Every object store datui can read, as a list of sources: a store plus the login reaching it (default S3 settings, a Google login, a [[cloud.connections]] entry). Each has an id that tells apart same-named buckets on different S3-compatible stores (s3://<id>@bucket/key); elsewhere URLs stay standard, usable in other tools. Discovery reads only environment variables and file existence; listing is cloud_browse’s, on a worker.

Structs§

Resolved
A cloud URL resolved to the plain URL the libraries understand and the settings that reach it.
S3Settings
How to reach one S3 or S3-compatible store.
SessionSources
Discovered sources, kept so each resolve (per peek, listing, open) does not reread every tool’s files; one config at a time, SessionSources::refresh rediscovers.
Source
One store and the login that reaches it.

Enums§

Signing
Whether requests to a place carry a signature.
Tier
Where a source came from. Lower wins when the same ID turns up twice, and sources are listed in this order.

Constants§

DEFAULT_AZURE_ENV
An Azure account named in the environment: a connection string, or an account with a key or SAS token.
DEFAULT_AZURE_LOGIN
A signed-in az.
DEFAULT_GCS
The Google login found in the environment or the application-default file.
DEFAULT_S3
The source built from [cloud] s3_*, --s3-* and the AWS_* environment: what a plain s3://bucket/key has always meant.

Functions§

access_key
The bucket or container url is in, as one string (s3://bucket, s3://<id>@bucket, gs://bucket, abfss://container@account); signing facts are kept per place.
discover
Every source this machine and the (effective) config describe, in display order; a configured source replaces a detected one of the same name. Runs no command: a profile’s CLI credentials are fetched on use (Source::with_credentials).
endpoint_host
The host and port of an endpoint URL, for display.
expand_azure_short_url
An az://, adl:// or azure:// URL (container/path) in canonical abfss:// form, the account taken from where it was typed (inside an account on home), the environment, or the config’s one account. Other paths pass through.
is_within
Whether url is root or somewhere inside it. Azure URLs are compared in their canonical form, and a trailing slash does not matter.
known_access
What this session learned about signing requests to the place url is in: true for unsigned.
on_home
The sources the home screen shows: every [[cloud.connections]] entry, and of the logins found on the machine, the kinds [cloud] discover allows.
profile_source_id
The ID of the source for an AWS profile: aws- and the profile’s name, lowercased, with anything that cannot go in an ID turned into -.
rediscover
The sources on this machine discovered again, as Ctrl+R asks: a login made since is found.
remember_access
Remember for the session whether place (an access_key) is read unsigned.
remember_bucket
Remember that source reaches bucket, for URLs that do not name their source.
remember_listed
Remember an earlier run’s buckets as listed now, so a Recent bucket opens with the login that found it. S3 only (Google lists projects; Azure URLs name their account).
resolve
Resolve url against configured and local sources, with an S3 bucket’s region. May run a credential command and ask S3: call on a worker.
resolve_for_open
As resolve, for opening: a Signing::Try place is settled first with one unsigned request, since the opening libraries cannot retry unsigned.
resolve_with
As resolve, with the environment supplied.
session_sources
The sources on this machine for config, discovered once for the session.