V 0.1.1
This commit is contained in:
@@ -4,12 +4,20 @@ use std::env;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Config {
|
||||
// Synology
|
||||
pub nas_fqdn: String,
|
||||
pub nas_user: String,
|
||||
pub nas_pass: String,
|
||||
pub nas_file: String,
|
||||
// Nexrender
|
||||
pub nexrender_api_url: String,
|
||||
pub output_folder: String,
|
||||
// Templates (all required)
|
||||
pub template_double_src: String,
|
||||
pub template_single_src: String,
|
||||
pub template_composition: String,
|
||||
pub template_output_module: String,
|
||||
pub template_output_ext: String,
|
||||
}
|
||||
|
||||
impl Config {
|
||||
@@ -21,8 +29,19 @@ impl Config {
|
||||
nas_user: env::var("NAS_USER").context("NAS_USER not set")?,
|
||||
nas_pass: env::var("NAS_PASS").context("NAS_PASS not set")?,
|
||||
nas_file: env::var("NAS_FILE").context("NAS_FILE not set")?,
|
||||
nexrender_api_url: env::var("NEXRENDER_API_URL").context("NEXRENDER_API_URL not set")?,
|
||||
nexrender_api_url: env::var("NEXRENDER_API_URL")
|
||||
.context("NEXRENDER_API_URL not set")?,
|
||||
output_folder: env::var("OUTPUT_FOLDER").context("OUTPUT_FOLDER not set")?,
|
||||
template_double_src: env::var("TEMPLATE_DOUBLE_SRC")
|
||||
.context("TEMPLATE_DOUBLE_SRC not set")?,
|
||||
template_single_src: env::var("TEMPLATE_SINGLE_SRC")
|
||||
.context("TEMPLATE_SINGLE_SRC not set")?,
|
||||
template_composition: env::var("TEMPLATE_COMPOSITION")
|
||||
.context("TEMPLATE_COMPOSITION not set")?,
|
||||
template_output_module: env::var("TEMPLATE_OUTPUT_MODULE")
|
||||
.context("TEMPLATE_OUTPUT_MODULE not set")?,
|
||||
template_output_ext: env::var("TEMPLATE_OUTPUT_EXT")
|
||||
.context("TEMPLATE_OUTPUT_EXT not set")?,
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user