pub(crate) struct Config {Show 19 fields
pub service_name: String,
pub core_bind: SocketAddr,
pub email_bind: SocketAddr,
pub level: String,
pub db_url: Option<String>,
pub swagger_ui: bool,
pub rp_id: String,
pub dashboard_origin: Url,
pub turnstile_secret_key: String,
pub timeouts: TimeoutConfig,
pub google_oauth2: GoogleOAuth2Config,
pub telemetry: Option<TelemetryConfig>,
pub redis: RedisConfig,
pub email_from_name: String,
pub email_from_address: String,
pub reverse_proxy: Option<ReverseProxyConfig>,
pub maxminddb_path: PathBuf,
pub aws: AwsConfig,
pub mtls: MtlsConfig,
}
Fields§
§service_name: String
§core_bind: SocketAddr
§email_bind: SocketAddr
§level: String
§db_url: Option<String>
§swagger_ui: bool
§rp_id: String
§dashboard_origin: Url
§turnstile_secret_key: String
§timeouts: TimeoutConfig
§google_oauth2: GoogleOAuth2Config
§telemetry: Option<TelemetryConfig>
§redis: RedisConfig
§email_from_name: String
§email_from_address: String
§reverse_proxy: Option<ReverseProxyConfig>
§maxminddb_path: PathBuf
§aws: AwsConfig
§mtls: MtlsConfig
Trait Implementations§
Source§impl ConfigParser for Config
impl ConfigParser for Config
Source§impl Default for Config
impl Default for Config
Source§fn default() -> Self
fn default() -> Self
Return Config { service_name: env!("CARGO_PKG_NAME").to_string(), core_bind: SocketAddr::from(([127, 0, 0, 1], 3001)), email_bind: SocketAddr::from(([127, 0, 0, 1], 3003)), level: ("info").into(), db_url: None, swagger_ui: false, rp_id: ("scuffle.cloud").into(), dashboard_origin: url::Url::from_str("https://dashboard.scuffle.cloud").unwrap(), turnstile_secret_key: ("1x0000000000000000000000000000000AA").into(), timeouts: Default::default(), google_oauth2: Default::default(), telemetry: Default::default(), redis: Default::default(), email_from_name: ("Scuffle").into(), email_from_address: ("no-reply@scuffle.cloud").into(), reverse_proxy: Default::default(), maxminddb_path: "./GeoLite2-City.mmdb".parse().unwrap(), aws: Default::default(), mtls: Default::default() }
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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>,
Source§#[doc(hidden)] fn deserialize_in_place<D>(
deserializer: D,
place: &mut Self,
) -> Result<(), <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
#[doc(hidden)] fn deserialize_in_place<D>(
deserializer: D,
place: &mut Self,
) -> Result<(), <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
self
from the given Deserializer. Read moreAuto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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>
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
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
&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>
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>>>
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>>>
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>>>
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 = _
sized_type_properties
)Source§#[doc(hidden)] const LAYOUT: Layout = _
#[doc(hidden)] const LAYOUT: Layout = _
sized_type_properties
)Source§#[doc(hidden)] const MAX_SLICE_LEN: usize = _
#[doc(hidden)] const MAX_SLICE_LEN: usize = _
sized_type_properties
)[Self]
. Read more