Struct cargo_registry::config::Config
[−]
[src]
pub struct Config { pub uploader: Uploader, pub session_key: String, pub git_repo_checkout: PathBuf, pub gh_client_id: String, pub gh_client_secret: String, pub db_url: String, pub env: Env, pub max_upload_size: u64, pub mirror: Replica, pub api_protocol: String, }
Fields
uploader: Uploader
session_key: String
git_repo_checkout: PathBuf
gh_client_id: String
gh_client_secret: String
db_url: String
env: Env
max_upload_size: u64
mirror: Replica
api_protocol: String
Trait Implementations
impl Clone for Config
[src]
fn clone(&self) -> Config
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Config
[src]
impl Default for Config
[src]
fn default() -> Config
[src]
Returns a default value for the application's config
Sets the following default values:
- Config::max_upload_size
: 10MiB
- Config::api_protocol
: https
Pulls values from the following environment variables:
- GIT_REPO_CHECKOUT
: The directory where the registry index was cloned.
- MIRROR
: Is this instance of cargo_registry a mirror of crates.io.
- HEROKU
: Is this instance of cargo_registry currently running on Heroku.
- S3_BUCKET
: The S3 bucket used to store crate files. If not present during development,
cargo_registry will fall back to a local uploader.
- S3_REGION
: The region in which the bucket was created. Optional if US standard.
- S3_ACCESS_KEY
: The access key to interact with S3. Optional if running a mirror.
- S3_SECRET_KEY
: The secret key to interact with S3. Optional if running a mirror.
- SESSION_KEY
: The key used to sign and encrypt session cookies.
- GH_CLIENT_ID
: The client ID of the associated GitHub application.
- GH_CLIENT_SECRET
: The client secret of the associated GitHub application.
- DATABASE_URL
: The URL of the postgres database to use.