pub struct UpstreamAuth {
pub auth_token: Option<String>,
pub auth_token_env: Option<String>,
pub api_key: Option<String>,
pub api_key_env: Option<String>,
}Fields§
§auth_token: Option<String>Bearer token, e.g. OpenAI style
auth_token_env: Option<String>Environment variable name for bearer token (preferred over storing secrets on disk)
api_key: Option<String>Optional API key header for some providers
api_key_env: Option<String>Environment variable name for API key header value
Implementations§
Source§impl UpstreamAuth
impl UpstreamAuth
pub fn resolve_auth_token(&self) -> Option<String>
pub fn resolve_api_key(&self) -> Option<String>
Trait Implementations§
Source§impl Clone for UpstreamAuth
impl Clone for UpstreamAuth
Source§fn clone(&self) -> UpstreamAuth
fn clone(&self) -> UpstreamAuth
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UpstreamAuth
impl Debug for UpstreamAuth
Source§impl Default for UpstreamAuth
impl Default for UpstreamAuth
Source§fn default() -> UpstreamAuth
fn default() -> UpstreamAuth
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for UpstreamAuth
impl<'de> Deserialize<'de> for UpstreamAuth
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for UpstreamAuth
impl RefUnwindSafe for UpstreamAuth
impl Send for UpstreamAuth
impl Sync for UpstreamAuth
impl Unpin for UpstreamAuth
impl UnwindSafe for UpstreamAuth
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more