Skip to main content

Module auth

Module auth 

Source
Expand description

Datadog credential management.

Loads and saves Datadog API credentials from/to the ~/.omni-dev/settings.json file using the existing env map.

Structs§

AuthStatus
Aggregate credential status across every known Datadog scope.
DatadogCredentials
Datadog API credentials.
DatadogScopeStatus
Summary of a single Datadog credential scope.

Constants§

DATADOG_API_KEY
Environment variable / settings key for the Datadog API key.
DATADOG_API_URL
Environment variable / settings key for an explicit Datadog API base URL.
DATADOG_APP_KEY
Environment variable / settings key for the Datadog application key.
DATADOG_SITE
Environment variable / settings key for the Datadog site (e.g. datadoghq.com).
DEFAULT_SITE
Default Datadog site when none is configured (US1 region).
KNOWN_SITES
Datadog sites recognised as non-warning.

Functions§

base_url_for_site
Returns the Datadog API base URL for a given site.
load_credentials
Loads Datadog credentials from environment variables or settings.json.
normalize_site
Normalises a user-supplied site string.
remove_credentials
Removes Datadog credential keys from ~/.omni-dev/settings.json.
save_credentials
Saves Datadog credentials to ~/.omni-dev/settings.json.
status
Builds an AuthStatus from the current settings / environment.