pub struct Config {Show 28 fields
pub sitename: String,
pub database_type: String,
pub database_url: String,
pub github_link: String,
pub github_token: Option<String>,
pub system_path: String,
pub services_path: String,
pub bin_path: String,
pub skills_path: String,
pub settings_path: String,
pub content_config_path: String,
pub geoip_database_path: Option<String>,
pub web_path: String,
pub web_config_path: String,
pub web_metadata_path: String,
pub host: String,
pub port: u16,
pub api_server_url: String,
pub api_internal_url: String,
pub api_external_url: String,
pub jwt_issuer: String,
pub jwt_access_token_expiration: i64,
pub jwt_refresh_token_expiration: i64,
pub jwt_audiences: Vec<JwtAudience>,
pub use_https: bool,
pub rate_limits: RateLimitConfig,
pub cors_allowed_origins: Vec<String>,
pub is_cloud: bool,
}Fields§
§sitename: String§database_type: String§database_url: String§github_link: String§github_token: Option<String>§system_path: String§services_path: String§bin_path: String§skills_path: String§settings_path: String§content_config_path: String§geoip_database_path: Option<String>§web_path: String§web_config_path: String§web_metadata_path: String§host: String§port: u16§api_server_url: String§api_internal_url: String§api_external_url: String§jwt_issuer: String§jwt_access_token_expiration: i64§jwt_refresh_token_expiration: i64§jwt_audiences: Vec<JwtAudience>§use_https: bool§rate_limits: RateLimitConfig§cors_allowed_origins: Vec<String>§is_cloud: boolImplementations§
Source§impl Config
impl Config
pub fn is_initialized() -> bool
pub fn init() -> Result<()>
pub fn try_init() -> Result<()>
pub fn get() -> Result<&'static Self>
pub fn from_profile(profile: &Profile) -> Result<Self>
pub fn init_from_profile(profile: &Profile) -> Result<()>
pub fn validate_database_config(&self) -> Result<()>
Trait Implementations§
Auto 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<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