sinan 0.1.0

A Boilerplate for Rapid Axum Web Service Deployment.
Documentation
use serde::{Deserialize, Serialize};

/// Database configuration
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct Database {
    /// The URI for connecting to the database. For example:
    pub uri: String,

    /// Enable `SQLx` statement logging
    pub enable_logging: bool,

    /// Minimum number of connections for a pool
    pub min_connections: u32,

    /// Maximum number of connections for a pool
    pub max_connections: u32,

    /// Set the timeout duration when acquiring a connection
    pub connect_timeout: u64,

    /// Set the idle duration before closing a connection
    pub idle_timeout: u64,

    /// Set the maximum lifetime of a connection
    pub max_lifetime: u64,

    /// Set the timeout for acquiring a connection
    pub acquire_timeout: Option<u64>,
}