pub struct GoogleCredentialStore { /* private fields */ }Implementations§
Source§impl GoogleCredentialStore
impl GoogleCredentialStore
pub fn new(accounts: Vec<GoogleAccount>) -> Self
pub fn empty() -> Self
pub fn account(&self, id: &str) -> Option<&GoogleAccount>
pub fn account_for_agent(&self, agent_id: &str) -> Option<&GoogleAccount>
Sourcepub fn refresh_lock(&self, handle: &CredentialHandle) -> Option<Arc<Mutex<()>>>
pub fn refresh_lock(&self, handle: &CredentialHandle) -> Option<Arc<Mutex<()>>>
Acquire the refresh mutex for the account behind handle. The
lock lives for the lifetime of the returned guard; callers
should hold it across the full HTTP roundtrip that rotates the
refresh_token on the disk. None when the handle points at an
unknown account (treat as NotFound).
Trait Implementations§
Source§impl CredentialStore for GoogleCredentialStore
impl CredentialStore for GoogleCredentialStore
type Account = GoogleAccount
fn channel(&self) -> Channel
Source§fn get(
&self,
handle: &CredentialHandle,
) -> Result<Self::Account, CredentialError>
fn get( &self, handle: &CredentialHandle, ) -> Result<Self::Account, CredentialError>
Materialise the account data for the handle. Returns
CredentialError::NotFound if the handle refers to an
account that was removed since issuance (hot-reload edge case).Source§fn issue(
&self,
account_id: &str,
agent_id: &str,
) -> Result<CredentialHandle, CredentialError>
fn issue( &self, account_id: &str, agent_id: &str, ) -> Result<CredentialHandle, CredentialError>
Create a handle after checking that
agent_id is permitted on
the account’s allow_agents list (empty list = accept all).
Called by the resolver at boot — never from hot paths.Source§fn list(&self) -> Vec<String>
fn list(&self) -> Vec<String>
Enumerate every account id known to this store. Used by the
gauntlet to diagnose missing
credentials.<channel> bindings.Source§fn allow_agents(&self, account_id: &str) -> Vec<String>
fn allow_agents(&self, account_id: &str) -> Vec<String>
allow_agents for an account, for boot-time cross-validation.
Empty vec means the account accepts any agent.Source§fn validate(&self) -> ValidationReport
fn validate(&self) -> ValidationReport
Run the store’s internal invariants (permissions, missing
files). Errors are non-fatal on their own — the gauntlet
merges them with cross-store checks before failing boot.
Auto Trait Implementations§
impl Freeze for GoogleCredentialStore
impl !RefUnwindSafe for GoogleCredentialStore
impl Send for GoogleCredentialStore
impl Sync for GoogleCredentialStore
impl Unpin for GoogleCredentialStore
impl UnsafeUnpin for GoogleCredentialStore
impl !UnwindSafe for GoogleCredentialStore
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