pub struct ApiKey {
pub id: i64,
pub name: Option<String>,
pub prefix: Option<String>,
pub scopes: Option<String>,
pub enabled: Option<i64>,
pub last_used_at: Option<String>,
pub created_at: Option<String>,
pub revoked_at: Option<String>,
pub key: Option<String>,
pub extra: Extra,
}Expand description
A scoped wlk_ API-key record (store/local_api_keys.rs; key_hash is never
serialized by the daemon). The plaintext key appears only in the create
response — capture it immediately.
Fields§
§id: i64§name: Option<String>§prefix: Option<String>wlk_ + first 6 chars — safe to display.
scopes: Option<String>CSV of scopes: read|run|admin.
enabled: Option<i64>§last_used_at: Option<String>§created_at: Option<String>§revoked_at: Option<String>§key: Option<String>The one-time plaintext key (create response only; never recoverable later).
extra: ExtraTrait Implementations§
Source§impl<'de> Deserialize<'de> for ApiKey
impl<'de> Deserialize<'de> for ApiKey
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 ApiKey
impl RefUnwindSafe for ApiKey
impl Send for ApiKey
impl Sync for ApiKey
impl Unpin for ApiKey
impl UnsafeUnpin for ApiKey
impl UnwindSafe for ApiKey
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