Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::CreateHTTPSecretFunctions Struct Reference

Static Public Member Functions

static vector< SecretType > GetDefaultSecretTypes ()
 Get the default secret types.
static vector< CreateSecretFunction > GetDefaultSecretFunctions ()
 Get the default secret functions.

Static Protected Member Functions

static unique_ptr< BaseSecret > CreateHTTPSecretFromConfig (ClientContext &context, CreateSecretInput &input)
 HTTP secret CONFIG provider.
static unique_ptr< BaseSecret > CreateHTTPSecretFromEnv (ClientContext &context, CreateSecretInput &input)
 HTTP secret ENV provider.

Member Function Documentation

◆ GetDefaultSecretTypes()

vector< SecretType > duckdb::CreateHTTPSecretFunctions::GetDefaultSecretTypes ( )
static

Get the default secret types.

299748 {
299749 vector<SecretType> result;
299750
299751 // HTTP secret
299752 SecretType secret_type;
299753 secret_type.name = "http";
299754 secret_type.deserializer = KeyValueSecret::Deserialize<KeyValueSecret>;
299755 secret_type.default_provider = "config";
299756 result.push_back(std::move(secret_type));
299757
299758 return result;
299759}

◆ GetDefaultSecretFunctions()

vector< CreateSecretFunction > duckdb::CreateHTTPSecretFunctions::GetDefaultSecretFunctions ( )
static

Get the default secret functions.

299762 {
299763 vector<CreateSecretFunction> result;
299764
299765 // HTTP secret CONFIG provider
299766 CreateSecretFunction http_config_fun;
299767 http_config_fun.secret_type = "http";
299768 http_config_fun.provider = "config";
299769 http_config_fun.function = CreateHTTPSecretFromConfig;
299770
299771 http_config_fun.named_parameters["verify_ssl"] = LogicalType::BOOLEAN;
299772 http_config_fun.named_parameters["http_proxy"] = LogicalType::VARCHAR;
299773 http_config_fun.named_parameters["http_proxy_password"] = LogicalType::VARCHAR;
299774 http_config_fun.named_parameters["http_proxy_username"] = LogicalType::VARCHAR;
299775
299776 http_config_fun.named_parameters["extra_http_headers"] =
299777 LogicalType::MAP(LogicalType::VARCHAR, LogicalType::VARCHAR);
299778 http_config_fun.named_parameters["bearer_token"] = LogicalType::VARCHAR;
299779 result.push_back(std::move(http_config_fun));
299780
299781 // HTTP secret ENV provider
299782 CreateSecretFunction http_env_fun;
299783 http_env_fun.secret_type = "http";
299784 http_env_fun.provider = "env";
299785 http_env_fun.function = CreateHTTPSecretFromEnv;
299786
299787 http_env_fun.named_parameters["verify_ssl"] = LogicalType::BOOLEAN;
299788 http_env_fun.named_parameters["http_proxy"] = LogicalType::VARCHAR;
299789 http_env_fun.named_parameters["http_proxy_password"] = LogicalType::VARCHAR;
299790 http_env_fun.named_parameters["http_proxy_username"] = LogicalType::VARCHAR;
299791
299792 http_env_fun.named_parameters["extra_http_headers"] = LogicalType::MAP(LogicalType::VARCHAR, LogicalType::VARCHAR);
299793 http_env_fun.named_parameters["bearer_token"] = LogicalType::VARCHAR;
299794 result.push_back(std::move(http_env_fun));
299795
299796 return result;
299797}
static unique_ptr< BaseSecret > CreateHTTPSecretFromEnv(ClientContext &context, CreateSecretInput &input)
HTTP secret ENV provider.
Definition duckdb.cpp:299807
static unique_ptr< BaseSecret > CreateHTTPSecretFromConfig(ClientContext &context, CreateSecretInput &input)
HTTP secret CONFIG provider.
Definition duckdb.cpp:299836
Here is the call graph for this function:

◆ CreateHTTPSecretFromConfig()

unique_ptr< BaseSecret > duckdb::CreateHTTPSecretFunctions::CreateHTTPSecretFromConfig ( ClientContext & context,
CreateSecretInput & input )
staticprotected

HTTP secret CONFIG provider.

Set redact keys

299837 {
299838 auto secret = make_uniq<KeyValueSecret>(input.scope, input.type, input.provider, input.name);
299839
299840 secret->TrySetValue("verify_ssl", input);
299841 secret->TrySetValue("http_proxy", input);
299842 secret->TrySetValue("http_proxy_password", input);
299843 secret->TrySetValue("http_proxy_username", input);
299844
299845 secret->TrySetValue("extra_http_headers", input);
299846 secret->TrySetValue("bearer_token", input);
299847
299849 secret->redact_keys = {"http_proxy_password"};
299850
299851 return std::move(secret);
299852}
Here is the caller graph for this function:

◆ CreateHTTPSecretFromEnv()

unique_ptr< BaseSecret > duckdb::CreateHTTPSecretFunctions::CreateHTTPSecretFromEnv ( ClientContext & context,
CreateSecretInput & input )
staticprotected

HTTP secret ENV provider.

299808 {
299809 auto secret = make_uniq<KeyValueSecret>(input.scope, input.type, input.provider, input.name);
299810
299811 auto http_proxy = TryGetEnv("http_proxy");
299812 if (http_proxy) {
299813 secret->secret_map["http_proxy"] = Value(http_proxy);
299814 }
299815 auto http_proxy_password = TryGetEnv("http_proxy_password");
299816 if (http_proxy_password) {
299817 secret->secret_map["http_proxy_password"] = Value(http_proxy_password);
299818 }
299819 auto http_proxy_username = TryGetEnv("http_proxy_username");
299820 if (http_proxy_username) {
299821 secret->secret_map["http_proxy_username"] = Value(http_proxy_username);
299822 }
299823
299824 // Allow overwrites
299825 secret->TrySetValue("verify_ssl", input);
299826 secret->TrySetValue("http_proxy", input);
299827 secret->TrySetValue("http_proxy_password", input);
299828 secret->TrySetValue("http_proxy_username", input);
299829
299830 secret->TrySetValue("extra_http_headers", input);
299831 secret->TrySetValue("bearer_token", input);
299832
299833 return std::move(secret);
299834}
Here is the caller graph for this function:

The documentation for this struct was generated from the following file: