pub struct ArminiusConfig {
pub server_name: OwnedServerName,
pub addr: SocketAddr,
pub client_base_url: Url,
pub oidc_well_known: Option<Url>,
pub scim_base_url: Option<Url>,
pub scim_token_endpoint: Option<String>,
pub scim_client_id: Option<String>,
pub scim_client_secret: Option<String>,
pub proxy_url: Option<Url>,
pub extra_ca_certs: Vec<PathBuf>,
}Expand description
The configuration for an instance of Arminius
Fields§
§server_name: OwnedServerNameThe name of the homeserver we are hosting https://spec.matrix.org/v1.14/appendices/#server-name
addr: SocketAddrThe address on which the component will be listening
client_base_url: UrlThe URL that clients should connect to
oidc_well_known: Option<Url>The OIDC base URL
scim_base_url: Option<Url>SCIM base URL used for user and session sync
scim_token_endpoint: Option<String>OAuth token endpoint URL used to obtain the access token for SCIM
scim_client_id: Option<String>OAuth client ID used to obtain the access token for SCIM
scim_client_secret: Option<String>OAuth client secret used to obtain the access token for SCIM
proxy_url: Option<Url>URL for the outgoing proxy
extra_ca_certs: Vec<PathBuf>Custom CA certificates
Implementations§
Source§impl ArminiusConfig
impl ArminiusConfig
Sourcepub fn new(
server_name: OwnedServerName,
addr: impl Into<SocketAddr>,
client_base_url: Url,
oidc_well_known: impl Into<Option<Url>>,
scim_base_url: impl Into<Option<Url>>,
scim_token_endpoint: impl Into<Option<String>>,
scim_client_id: impl Into<Option<String>>,
scim_client_secret: impl Into<Option<String>>,
proxy_url: impl Into<Option<Url>>,
extra_ca_certs: &[PathBuf],
) -> ArminiusConfig
pub fn new( server_name: OwnedServerName, addr: impl Into<SocketAddr>, client_base_url: Url, oidc_well_known: impl Into<Option<Url>>, scim_base_url: impl Into<Option<Url>>, scim_token_endpoint: impl Into<Option<String>>, scim_client_id: impl Into<Option<String>>, scim_client_secret: impl Into<Option<String>>, proxy_url: impl Into<Option<Url>>, extra_ca_certs: &[PathBuf], ) -> ArminiusConfig
Create a new ArminiusConfig
Sourcepub fn from_env() -> Result<ArminiusConfig, ArminiusConfigurationError>
pub fn from_env() -> Result<ArminiusConfig, ArminiusConfigurationError>
Reads the configuration from the environment
Sourcepub fn for_test_using_ipv4() -> ArminiusConfig
pub fn for_test_using_ipv4() -> ArminiusConfig
Generate a config for testing purposes, assigning a random local port Server name and address will be IPv4 based.
Sourcepub fn for_test_using_ipv6() -> ArminiusConfig
pub fn for_test_using_ipv6() -> ArminiusConfig
Generate a config for testing purposes, assigning a random local port. Server name and address will be IPv6 based.
Sourcepub fn test_config_for(bind_to_ipv6: bool) -> ArminiusConfig
pub fn test_config_for(bind_to_ipv6: bool) -> ArminiusConfig
Generate a config for testing purposes, assigning a random local port.
Trait Implementations§
Source§impl Clone for ArminiusConfig
impl Clone for ArminiusConfig
Source§fn clone(&self) -> ArminiusConfig
fn clone(&self) -> ArminiusConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ArminiusConfig
impl Debug for ArminiusConfig
Source§impl FromRef<ServerState> for ArminiusConfig
impl FromRef<ServerState> for ArminiusConfig
Source§fn from_ref(component_state: &ServerState) -> ArminiusConfig
fn from_ref(component_state: &ServerState) -> ArminiusConfig
Auto Trait Implementations§
impl Freeze for ArminiusConfig
impl RefUnwindSafe for ArminiusConfig
impl Send for ArminiusConfig
impl Sync for ArminiusConfig
impl Unpin for ArminiusConfig
impl UnsafeUnpin for ArminiusConfig
impl UnwindSafe for ArminiusConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 moreimpl<T> JsonCastable<CanonicalJsonValue> for T
impl<T> JsonCastable<Value> for T
§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg] or
a color-specific method, such as [OwoColorize::green], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg] or
a color-specific method, such as [OwoColorize::on_yellow], Read more