satstream_rust_sdk/apis/
configuration.rs

1/* 
2 * Satstream API
3 *
4 * Satstream API
5 *
6 * OpenAPI spec version: 1.0
7 * Contact: team@satstream.io
8 * Generated by: https://github.com/swagger-api/swagger-codegen.git
9 */
10
11use hyper;
12use std::collections::HashMap;
13
14pub struct Configuration<C: hyper::client::Connect> {
15  pub base_path: String,
16  pub user_agent: Option<String>,
17  pub client: hyper::client::Client<C>,
18  pub basic_auth: Option<BasicAuth>,
19  pub oauth_access_token: Option<String>,
20  pub api_key: Option<ApiKey>,
21  // TODO: take an oauth2 token source, similar to the go one
22}
23
24pub type BasicAuth = (String, Option<String>);
25
26pub struct ApiKey {
27  pub prefix: Option<String>,
28  pub key: String,
29}
30
31impl<C: hyper::client::Connect> Configuration<C> {
32  pub fn new(client: hyper::client::Client<C>) -> Configuration<C> {
33    Configuration {
34      base_path: "https://api.satstream.io/api/v1".to_owned(),
35      user_agent: Some("Swagger-Codegen/1.0/rust".to_owned()),
36      client: client,
37      basic_auth: None,
38      oauth_access_token: None,
39      api_key: None,
40    }
41  }
42}