Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion crates/devbox-common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ library — no I/O.
`DevboxListResponse`, `HealthResponse`, `PoolMetricsResponse`,
`ProtectedResourceMetadata`. Release takes no body — the owner is the
authenticated principal, so there is no `ReleaseRequest`.
- **Config structs** — `ServerConfig`, `DatabaseConfig`.

All types derive `serde::{Serialize, Deserialize}`; the AWS-id newtypes are
`#[serde(transparent)]`, so they serialize as plain strings. Dependencies are
Expand Down
34 changes: 0 additions & 34 deletions crates/devbox-common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -625,40 +625,6 @@ pub struct PoolMetricsResponse {
pub warm: u32,
}

// ============================================================================
// Config Structs
// ============================================================================

/// Server configuration.
#[derive(Debug, Clone)]
pub struct ServerConfig {
/// Port to listen on.
pub port: u16,
/// Database URL.
pub database_url: String,
}

/// Database configuration.
#[derive(Debug, Clone)]
pub struct DatabaseConfig {
/// Database URL (sqlite: or postgres:).
pub url: String,
/// Maximum pool connections.
pub max_connections: u32,
/// Minimum idle connections.
pub min_connections: u32,
}

impl Default for DatabaseConfig {
fn default() -> Self {
Self {
url: "sqlite::memory:".to_string(),
max_connections: 25,
min_connections: 2,
}
}
}

// ============================================================================
// Tests
// ============================================================================
Expand Down
Loading