v0.3 release #9

Merged
phoenix merged 6 commits from devel into main 2025-07-23 22:04:06 +00:00
4 changed files with 11 additions and 1 deletions
Showing only changes of commit e7e6fd904b - Show all commits

View File

@@ -6,3 +6,4 @@ POSTGRES_MAIN_PASSWORD=password
POSTGRES_MAIN_DB=my_db POSTGRES_MAIN_DB=my_db
POSTGRES_MAIN_HOST=localhost POSTGRES_MAIN_HOST=localhost
DATABASE_URL=postgres://${POSTGRES_MAIN_USER}:${POSTGRES_MAIN_PASSWORD}@${POSTGRES_MAIN_HOST}:5432/${POSTGRES_MAIN_DB} DATABASE_URL=postgres://${POSTGRES_MAIN_USER}:${POSTGRES_MAIN_PASSWORD}@${POSTGRES_MAIN_HOST}:5432/${POSTGRES_MAIN_DB}
ICARUS_BASE_API_URL=https://icarus.com

2
Cargo.lock generated
View File

@@ -277,7 +277,7 @@ checksum = "f154ce46856750ed433c8649605bf7ed2de3bc35fd9d2a9f30cddd873c80cb08"
[[package]] [[package]]
name = "icarus_envy" name = "icarus_envy"
version = "0.1.0" version = "0.2.0"
dependencies = [ dependencies = [
"async-std", "async-std",
"dotenvy", "dotenvy",

View File

@@ -18,3 +18,8 @@ pub async fn get_root_directory() -> String {
dotenvy::dotenv().ok(); dotenvy::dotenv().ok();
std::env::var(crate::keys::ROOT_DIRECTORY).expect(crate::keys::error::ROOT_DIRECTORY) std::env::var(crate::keys::ROOT_DIRECTORY).expect(crate::keys::error::ROOT_DIRECTORY)
} }
pub async fn get_icarus_base_api_url() -> String {
dotenvy::dotenv().ok();
std::env::var(crate::keys::ICARUS_BASE_API_URL).expect(crate::keys::error::ICARUS_BASE_API_URL)
}

View File

@@ -12,9 +12,13 @@ pub const SECRET_KEY: &str = "SECRET_KEY";
// Environment key for root directory for the icarus app // Environment key for root directory for the icarus app
pub const ROOT_DIRECTORY: &str = "ROOT_DIRECTORY"; pub const ROOT_DIRECTORY: &str = "ROOT_DIRECTORY";
// Environment key for icarus api url
pub const ICARUS_BASE_API_URL: &str = "ICARUS_BASE_API_URL";
pub mod error { pub mod error {
pub const DB_URL: &str = "DATABASE_URL must be set in .env"; pub const DB_URL: &str = "DATABASE_URL must be set in .env";
pub const SECRET_KEY: &str = "SECRET_KEY must be set in environment file"; pub const SECRET_KEY: &str = "SECRET_KEY must be set in environment file";
pub const SECRET_MAIN_KEY: &str = "SECRET_MAIN_KEY must not be set in environment file"; pub const SECRET_MAIN_KEY: &str = "SECRET_MAIN_KEY must not be set in environment file";
pub const ROOT_DIRECTORY: &str = "ROOT_DIRECTORY must not be set in environment file"; pub const ROOT_DIRECTORY: &str = "ROOT_DIRECTORY must not be set in environment file";
pub const ICARUS_BASE_API_URL: &str = "ICARUS_BASE_API_URL must not be set in enviornment file";
} }