github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/clients/rust/src/apis/configuration.rs (about) 1 /* 2 * lakeFS API 3 * 4 * lakeFS HTTP API 5 * 6 * The version of the OpenAPI document: 1.0.0 7 * Contact: services@treeverse.io 8 * Generated by: https://openapi-generator.tech 9 */ 10 11 12 13 #[derive(Debug, Clone)] 14 pub struct Configuration { 15 pub base_path: String, 16 pub user_agent: Option<String>, 17 pub client: reqwest::Client, 18 pub basic_auth: Option<BasicAuth>, 19 pub oauth_access_token: Option<String>, 20 pub bearer_access_token: Option<String>, 21 pub api_key: Option<ApiKey>, 22 // TODO: take an oauth2 token source, similar to the go one 23 } 24 25 pub type BasicAuth = (String, Option<String>); 26 27 #[derive(Debug, Clone)] 28 pub struct ApiKey { 29 pub prefix: Option<String>, 30 pub key: String, 31 } 32 33 34 impl Configuration { 35 pub fn new() -> Configuration { 36 Configuration::default() 37 } 38 } 39 40 impl Default for Configuration { 41 fn default() -> Self { 42 Configuration { 43 base_path: "/api/v1".to_owned(), 44 user_agent: Some("OpenAPI-Generator/1.0.0/rust".to_owned()), 45 client: reqwest::Client::new(), 46 basic_auth: None, 47 oauth_access_token: None, 48 bearer_access_token: None, 49 api_key: None, 50 51 } 52 } 53 }