summer-postgres 0.5.0

Integrate tokio-postgres with summer-rs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use schemars::JsonSchema;
use serde::Deserialize;
use summer::config::Configurable;

summer::submit_config_schema!("postgres", PgConfig);

#[derive(Debug, Configurable, Clone, JsonSchema, Deserialize)]
#[config_prefix = "postgres"]
pub struct PgConfig {
    /// The URI for connecting to the postgres. For example:
    /// * postgresql: `postgres://root:12341234@localhost:5432/myapp_development`
    ///
    /// Please refer to [tokio_postgres::Config] for details.
    pub connect: String,
}