typesense_rs/apis/
configuration.rs1#[derive(Debug, Clone)]
10pub struct Configuration {
11 pub base_path: String,
12 pub user_agent: Option<String>,
13 pub client: reqwest::Client,
14 pub basic_auth: Option<BasicAuth>,
15 pub oauth_access_token: Option<String>,
16 pub bearer_access_token: Option<String>,
17 pub api_key: Option<ApiKey>,
18}
19
20pub type BasicAuth = (String, Option<String>);
21
22#[derive(Debug, Clone)]
23pub struct ApiKey {
24 pub prefix: Option<String>,
25 pub key: String,
26}
27
28impl Configuration {
29 pub fn new() -> Configuration {
30 Configuration::default()
31 }
32}
33
34impl Default for Configuration {
35 fn default() -> Self {
36 Configuration {
37 base_path: "http://localhost".to_owned(),
38 user_agent: Some("OpenAPI-Generator/27.0/rust".to_owned()),
39 client: reqwest::Client::new(),
40 basic_auth: None,
41 oauth_access_token: None,
42 bearer_access_token: None,
43 api_key: None,
44 }
45 }
46}