pub(crate) struct Global {Show 17 fields
pub(crate) config: Config,
pub(crate) database: Pool<AsyncPgConnection>,
pub(crate) user_loader: DataLoader<UserLoader>,
pub(crate) organization_loader: DataLoader<OrganizationLoader>,
pub(crate) organization_member_by_user_id_loader: DataLoader<OrganizationMemberByUserIdLoader>,
pub(crate) external_http_client: Client,
pub(crate) webauthn: Webauthn,
pub(crate) open_telemetry: OpenTelemetry,
pub(crate) redis: Pool,
pub(crate) email_service_client: EmailServiceClient<Channel>,
pub(crate) geoip_resolver: GeoIpResolver,
pub(crate) aws_ses_req_signer: Signer<Credential>,
pub(crate) mtls_root_cert: Vec<u8>,
pub(crate) mtls_core_cert: Vec<u8>,
pub(crate) mtls_core_private_key: Vec<u8>,
pub(crate) mtls_email_cert: Vec<u8>,
pub(crate) mtls_email_private_key: Vec<u8>,
}
Fields§
§config: Config
§database: Pool<AsyncPgConnection>
§user_loader: DataLoader<UserLoader>
§organization_loader: DataLoader<OrganizationLoader>
§organization_member_by_user_id_loader: DataLoader<OrganizationMemberByUserIdLoader>
§external_http_client: Client
§webauthn: Webauthn
§open_telemetry: OpenTelemetry
§redis: Pool
§email_service_client: EmailServiceClient<Channel>
§geoip_resolver: GeoIpResolver
§aws_ses_req_signer: Signer<Credential>
§mtls_root_cert: Vec<u8>
§mtls_core_cert: Vec<u8>
§mtls_core_private_key: Vec<u8>
§mtls_email_cert: Vec<u8>
§mtls_email_private_key: Vec<u8>
Trait Implementations§
Source§impl AwsInterface for Global
impl AwsInterface for Global
fn aws_region(&self) -> &str
fn aws_ses_req_signer(&self) -> &Signer<Credential>
Source§impl ConfigInterface for Global
impl ConfigInterface for Global
fn dashboard_origin(&self) -> &Url
fn email_from_name(&self) -> &str
fn email_from_address(&self) -> &str
fn google_oauth2_config(&self) -> GoogleOAuth2Config<'_>
fn service_bind(&self) -> SocketAddr
fn swagger_ui_enabled(&self) -> bool
fn timeout_config(&self) -> TimeoutConfig
fn turnstile_secret_key(&self) -> &str
Source§impl ConfigInterface for Global
impl ConfigInterface for Global
fn service_bind(&self) -> SocketAddr
Source§impl DatabaseInterface for Global
impl DatabaseInterface for Global
type Connection<'a> = PooledConnection<'a, AsyncDieselConnectionManager<AsyncPgConnection>> where Self: 'a
async fn db(&self) -> Result<Self::Connection<'_>>
Source§impl DataloaderInterface for Global
impl DataloaderInterface for Global
fn organization_loader(&self) -> &DataLoader<OrganizationLoader>
fn user_loader(&self) -> &DataLoader<UserLoader>
fn organization_member_by_user_id_loader( &self, ) -> &DataLoader<OrganizationMemberByUserIdLoader>
Source§impl EmailInterface for Global
impl EmailInterface for Global
fn email_service(&self) -> impl EmailServiceClient
Source§impl GeoIpInterface for Global
impl GeoIpInterface for Global
fn geo_ip_resolver(&self) -> &GeoIpResolver
fn reverse_proxy_config(&self) -> Option<ReverseProxyConfig<'_>>
Source§impl Global for Global
impl Global for Global
Source§fn tokio_runtime() -> Runtime
fn tokio_runtime() -> Runtime
Builds the tokio runtime for the process. Read more
Source§fn on_services_start(
self: &Arc<Self>,
) -> impl Future<Output = Result<(), Error>> + Send
fn on_services_start( self: &Arc<Self>, ) -> impl Future<Output = Result<(), Error>> + Send
Called right before all services start. Read more
Source§impl HttpClientInterface for Global
impl HttpClientInterface for Global
fn external_http_client(&self) -> &Client
Source§impl HttpClientInterface for Global
impl HttpClientInterface for Global
fn external_http_client(&self) -> &Client
Source§impl MtlsInterface for Global
impl MtlsInterface for Global
fn mtls_root_cert_pem(&self) -> &[u8] ⓘ
fn mtls_cert_pem(&self) -> &[u8] ⓘ
fn mtls_private_key_pem(&self) -> &[u8] ⓘ
Source§impl MtlsInterface for Global
impl MtlsInterface for Global
fn mtls_root_cert_pem(&self) -> &[u8] ⓘ
fn mtls_cert_pem(&self) -> &[u8] ⓘ
fn mtls_private_key_pem(&self) -> &[u8] ⓘ
Source§impl RedisInterface for Global
impl RedisInterface for Global
type RedisConnection<'a> = Pool where Self: 'a
fn redis(&self) -> &Self::RedisConnection<'_>
Source§impl SignalConfig for Global
impl SignalConfig for Global
Source§fn on_shutdown(
self: &Arc<Self>,
) -> impl Future<Output = Result<(), Error>> + Send
fn on_shutdown( self: &Arc<Self>, ) -> impl Future<Output = Result<(), Error>> + Send
Called when the service is shutting down.
Source§fn on_force_shutdown(
&self,
signal: Option<SignalKind>,
) -> impl Future<Output = Result<(), Error>> + Send
fn on_force_shutdown( &self, signal: Option<SignalKind>, ) -> impl Future<Output = Result<(), Error>> + Send
Called when the service is force shutting down.
Source§fn block_global_shutdown(&self) -> impl Future<Output = ()> + Send
fn block_global_shutdown(&self) -> impl Future<Output = ()> + Send
Waits for the global shutdown to complete after a signal cancels the local context.
Defaults to the global context’s shutdown ([
scuffle_context::Handler::global().shutdown()
]).
Override to use a custom context or condition for shutdown completion.Source§impl TelemetryConfig for Global
impl TelemetryConfig for Global
Source§fn bind_address(&self) -> Option<SocketAddr>
fn bind_address(&self) -> Option<SocketAddr>
Return the bind address for the http server.
Source§fn http_server_name(&self) -> &str
fn http_server_name(&self) -> &str
Return the http server name.
Source§fn opentelemetry(&self) -> Option<&OpenTelemetry>
fn opentelemetry(&self) -> Option<&OpenTelemetry>
Pass an OpenTelemetry instance to the service. Read more
impl Global for Global
impl Global for Global
Auto Trait Implementations§
impl !Freeze for Global
impl !RefUnwindSafe for Global
impl Send for Global
impl Sync for Global
impl Unpin for Global
impl !UnwindSafe for Global
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<'s, P, T> CallbackResult<'s, P, T> for Pwhere
T: Logos<'s>,
impl<'s, P, T> CallbackResult<'s, P, T> for Pwhere
T: Logos<'s>,
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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
Source§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self
to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self
to an expression for Diesel’s query builder. Read moreSource§impl<A, B> IsEqualPrivate<B, Equal> for A
impl<A, B> IsEqualPrivate<B, Equal> for A
Source§impl<A, B> IsEqualPrivate<B, Greater> for A
impl<A, B> IsEqualPrivate<B, Greater> for A
Source§impl<A, B> IsEqualPrivate<B, Less> for A
impl<A, B> IsEqualPrivate<B, Less> for A
Source§impl<A, B> IsGreaterOrEqualPrivate<B, Equal> for A
impl<A, B> IsGreaterOrEqualPrivate<B, Equal> for A
Source§impl<A, B> IsGreaterOrEqualPrivate<B, Greater> for A
impl<A, B> IsGreaterOrEqualPrivate<B, Greater> for A
Source§impl<A, B> IsGreaterOrEqualPrivate<B, Less> for A
impl<A, B> IsGreaterOrEqualPrivate<B, Less> for A
Source§impl<A, B> IsGreaterPrivate<B, Equal> for A
impl<A, B> IsGreaterPrivate<B, Equal> for A
Source§impl<A, B> IsGreaterPrivate<B, Greater> for A
impl<A, B> IsGreaterPrivate<B, Greater> for A
Source§impl<A, B> IsGreaterPrivate<B, Less> for A
impl<A, B> IsGreaterPrivate<B, Less> for A
Source§impl<A, B> IsLessOrEqualPrivate<B, Equal> for A
impl<A, B> IsLessOrEqualPrivate<B, Equal> for A
Source§impl<A, B> IsLessOrEqualPrivate<B, Greater> for A
impl<A, B> IsLessOrEqualPrivate<B, Greater> for A
Source§impl<A, B> IsLessOrEqualPrivate<B, Less> for A
impl<A, B> IsLessOrEqualPrivate<B, Less> for A
Source§impl<A, B> IsLessPrivate<B, Equal> for A
impl<A, B> IsLessPrivate<B, Equal> for A
Source§impl<A, B> IsLessPrivate<B, Greater> for A
impl<A, B> IsLessPrivate<B, Greater> for A
Source§impl<A, B> IsLessPrivate<B, Less> for A
impl<A, B> IsLessPrivate<B, Less> for A
Source§impl<A, B> IsNotEqualPrivate<B, Equal> for A
impl<A, B> IsNotEqualPrivate<B, Equal> for A
Source§impl<A, B> IsNotEqualPrivate<B, Greater> for A
impl<A, B> IsNotEqualPrivate<B, Greater> for A
Source§impl<A, B> IsNotEqualPrivate<B, Less> for A
impl<A, B> IsNotEqualPrivate<B, Less> for A
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T, Conn> RunQueryDsl<Conn> for T
impl<T, Conn> RunQueryDsl<Conn> for T
Source§fn execute<'conn, 'query>(
self,
conn: &'conn mut Conn,
) -> <Conn as AsyncConnection>::ExecuteFuture<'conn, 'query>
fn execute<'conn, 'query>( self, conn: &'conn mut Conn, ) -> <Conn as AsyncConnection>::ExecuteFuture<'conn, 'query>
Executes the given command, returning the number of rows affected. Read more
Source§fn load<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>
fn load<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>
Source§fn load_stream<'conn, 'query, U>(
self,
conn: &'conn mut Conn,
) -> Self::LoadFuture<'conn>where
Conn: AsyncConnection,
U: 'conn,
Self: LoadQuery<'query, Conn, U> + 'query,
fn load_stream<'conn, 'query, U>(
self,
conn: &'conn mut Conn,
) -> Self::LoadFuture<'conn>where
Conn: AsyncConnection,
U: 'conn,
Self: LoadQuery<'query, Conn, U> + 'query,
Source§fn get_result<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>, fn(Self::Stream<'conn>) -> Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>>
fn get_result<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<Self::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>, fn(Self::Stream<'conn>) -> Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>>
Runs the command, and returns the affected row. Read more
Source§fn get_results<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>
fn get_results<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>
Runs the command, returning an
Vec
with the affected rows. Read moreSource§fn first<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<<Self::Output as LoadQuery<'query, Conn, U>>::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>, fn(<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>) -> Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>>
fn first<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<<Self::Output as LoadQuery<'query, Conn, U>>::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>, fn(<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>) -> Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>>
Attempts to load a single record. Read more
Source§impl<T> SizeEq<D<T>> for Twhere
T: ?Sized,
impl<T> SizeEq<D<T>> for Twhere
T: ?Sized,
fn cast_from_raw(t: PtrInner<'_, D<T>>) -> PtrInner<'_, T>
Source§impl<T> SizeEq<D<T>> for Twhere
T: ?Sized,
impl<T> SizeEq<D<T>> for Twhere
T: ?Sized,
fn cast_from_raw(t: PtrInner<'_, D<T>>) -> PtrInner<'_, T>
Source§impl<T> SizeEq<ManuallyDrop<T>> for Twhere
T: ?Sized,
impl<T> SizeEq<ManuallyDrop<T>> for Twhere
T: ?Sized,
fn cast_from_raw(t: PtrInner<'_, ManuallyDrop<T>>) -> PtrInner<'_, T>
Source§impl<T> SizeEq<MaybeUninit<T>> for T
impl<T> SizeEq<MaybeUninit<T>> for T
fn cast_from_raw(t: PtrInner<'_, MaybeUninit<T>>) -> PtrInner<'_, T>
Source§impl<T> SizeEq<S<T>> for Twhere
T: ?Sized,
impl<T> SizeEq<S<T>> for Twhere
T: ?Sized,
fn cast_from_raw(t: PtrInner<'_, S<T>>) -> PtrInner<'_, T>
Source§impl<T> SizeEq<S<T>> for Twhere
T: ?Sized,
impl<T> SizeEq<S<T>> for Twhere
T: ?Sized,
fn cast_from_raw(t: PtrInner<'_, S<T>>) -> PtrInner<'_, T>
Source§impl<T> SizeEq<T> for Twhere
T: ?Sized,
impl<T> SizeEq<T> for Twhere
T: ?Sized,
fn cast_from_raw(t: PtrInner<'_, T>) -> PtrInner<'_, T>
Source§impl<T> SizeEq<UnsafeCell<T>> for Twhere
T: ?Sized,
impl<T> SizeEq<UnsafeCell<T>> for Twhere
T: ?Sized,
fn cast_from_raw(t: PtrInner<'_, UnsafeCell<T>>) -> PtrInner<'_, T>
Source§impl<T> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)] const IS_ZST: bool = _
#[doc(hidden)] const IS_ZST: bool = _
🔬This is a nightly-only experimental API. (
sized_type_properties
)Source§#[doc(hidden)] const LAYOUT: Layout = _
#[doc(hidden)] const LAYOUT: Layout = _
🔬This is a nightly-only experimental API. (
sized_type_properties
)Source§#[doc(hidden)] const MAX_SLICE_LEN: usize = _
#[doc(hidden)] const MAX_SLICE_LEN: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties
)The largest safe length for a
[Self]
. Read more