Struct kong::Konfig

source ยท
pub struct Konfig {
    pub port: u16,
    pub admin_email: Option<String>,
    pub working_directory: Option<String>,
    pub auth_cookie_name: String,
    pub static_files_path: Option<String>,
    pub host: String,
    pub secret_key: String,
    pub console_log: Option<bool>,
    pub log_file: Option<bool>,
}
Expand description

๐ŸŽ›๏ธ Server configuration

Fieldsยง

ยงport: u16

Port to access the server

ยงadmin_email: Option<String>

Admin email address

ยงworking_directory: Option<String>

Kong server working directory, path should end with / defaults to kong/

ยงauth_cookie_name: String

Name of the authorization session cookie id

ยงstatic_files_path: Option<String>

Path to static files, if not provided no static files will be served

ยงhost: String

Node hostname

ยงsecret_key: String

Kong secret key

ยงconsole_log: Option<bool>

Weather the server should log information to console. Console logging is enabled by default.

ยงlog_file: Option<bool>

Weather the server should log information to file, the file is stored in the working directory as LOG. Logging to the LOG file is disabled by default

Implementationsยง

Read server config file from path provided as an argument when the program was started.

read port from config file

Read working directory from config file

read loggin

Trait Implementationsยง

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementationsยง

Blanket Implementationsยง

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.