pub struct AuthEvent {
pub event: String,
pub user_id: Option<String>,
pub provider: Option<String>,
pub status: String,
pub duration_ms: f64,
pub error: Option<String>,
pub timestamp: String,
pub request_id: Option<String>,
}Expand description
Structured log for authentication events
Fields§
§event: String§user_id: Option<String>§provider: Option<String>§status: String§duration_ms: f64§error: Option<String>§timestamp: String§request_id: Option<String>Implementations§
Source§impl AuthEvent
impl AuthEvent
pub fn new(event: &str) -> Self
pub fn with_user_id(self, user_id: String) -> Self
pub fn with_provider(self, provider: String) -> Self
pub fn with_request_id(self, request_id: String) -> Self
pub fn success(self, duration_ms: f64) -> Self
pub fn error(self, error: String, duration_ms: f64) -> Self
pub fn log(&self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AuthEvent
impl RefUnwindSafe for AuthEvent
impl Send for AuthEvent
impl Sync for AuthEvent
impl Unpin for AuthEvent
impl UnwindSafe for AuthEvent
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request