Skip to main content

Module profile

Module profile 

Source
Expand description

profile command: manage named server connection profiles.

This module only owns the CLI surface (argument parsing, prompts, output). The persisted schema lives in crate::cli::config; secrets in crate::cli::secrets.

Every value can be passed on the command line. Anything missing is prompted for in a terminal; outside one it falls back to its default or fails naming the option to pass, so scripts never hang on a prompt.

Re-exportsΒ§

use crate::cli::client::unix_now; πŸ”’
use crate::cli::config::CliConfiguration; πŸ”’
use crate::cli::config::DEFAULT_CLIENT_CREDENTIALS_SCOPE; πŸ”’
use crate::cli::config::Profile; πŸ”’
use crate::cli::config::ProfileAuth; πŸ”’
use crate::cli::config::write_config; πŸ”’
use crate::cli::secrets; πŸ”’
use crate::cli::secrets::ProfileSecrets; πŸ”’
use crate::cli::secrets::StoredTokens; πŸ”’
use crate::cli::state::CONFIG_LOCATION; πŸ”’
use crate::cli::state::CliState; πŸ”’
use crate::cli::state::SECRETS_LOCATION; πŸ”’
use clap::Args; πŸ”’
use clap::Subcommand; πŸ”’
use clap::ValueEnum; πŸ”’
use dialoguer::Confirm; πŸ”’
use dialoguer::Input; πŸ”’
use dialoguer::Password; πŸ”’
use dialoguer::Select; πŸ”’
use dialoguer::theme::ColorfulTheme; πŸ”’
use haste_fhir_model::r4::generated::terminology::IssueType; πŸ”’
use haste_fhir_operation_error::OperationOutcomeError; πŸ”’
use std::io::IsTerminal; πŸ”’
use std::sync::Arc; πŸ”’
use tokio::sync::Mutex; πŸ”’

StructsΒ§

CreateArgs πŸ”’
Prompter πŸ”’
Fills in values that weren’t passed on the command line.

EnumsΒ§

AuthModeChoice πŸ”’
How the CLI authenticates for a profile.
ProfileCommands πŸ”’
Manage named server connection profiles.

ConstantsΒ§

CREATE_HINT πŸ”’
DEFAULT_AUTHORIZATION_CODE_SCOPE πŸ”’
DEFAULT_REDIRECT_URI πŸ”’
USE_HINT πŸ”’

FunctionsΒ§

build_profile πŸ”’
Builds the profile create saves, plus the secret (client secret or password) that goes in the secrets file rather than the profile.
create πŸ”’
delete πŸ”’
error πŸ”’
find πŸ”’
format_duration πŸ”’
ignored_options πŸ”’
Options that were passed but that mode doesn’t use.
login_status πŸ”’
missing πŸ”’
no_active_hint πŸ”’
pick πŸ”’
The named profile, or one picked from a list when no name was given.
print_list πŸ”’
print_profile πŸ”’
prompt_failed πŸ”’
run πŸ”’
Runs the profile command group.
secret_status πŸ”’