[][src]Struct df_st_core::config::DBURLConfig

pub struct DBURLConfig {
    pub db_path: Option<PathBuf>,
    pub user: Option<String>,
    pub password: String,
    pub host: Option<String>,
    pub port: Option<u16>,
    pub database: Option<String>,
    pub ssl_mode: Option<String>,
    pub ssl_cert: Option<PathBuf>,
    pub ssl_key: Option<PathBuf>,
}

Everything in the configuration under df_storyteller-config.json.database.config.

Fields

db_path: Option<PathBuf>

Path for the SQLite database file. Only used for SQLite service. Prefer to use the .db or .sqlite, but other extension will work. This file path is used both for writing to and reading from the database. Default is set to "df_st_database.db"

user: Option<String>

User name to connect as. Only used for Postgres service. Default is set to "df_storyteller"

password: String

Password to be used if the server demands password authentication. Only used for Postgres service. No default, this has to be set

host: Option<String>

Name of host to connect to. Only used for Postgres service. Default is set to "localhost"

port: Option<u16>

Port number to connect to at the server host, or socket file name extension for Unix-domain connections. Only used for Postgres service. Default is set to 5432

database: Option<String>

The database name. Defaults to be the same as the user name. Only used for Postgres service. Default is set to "df_storyteller"

ssl_mode: Option<String>

This option determines whether or with what priority a secure SSL TCP/IP connection will be negotiated with the server. Only used for Postgres service. Allowed options: "disable", "allow", "prefer", "require", "verify-ca" or "verify-full" Default is set to "prefer"

ssl_cert: Option<PathBuf>

This parameter specifies the file name of the client SSL certificate, replacing the default ~/.postgresql/postgresql.crt. Only used for Postgres service. This parameter is ignored if an SSL connection is not made.

ssl_key: Option<PathBuf>

This parameter specifies the location for the secret key used for the client certificate. It can either specify a file name that will be used instead of the default ~/.postgresql/postgresql.key, or it can specify a key obtained from an external "engine" (engines are OpenSSL loadable modules). Only used for Postgres service. This parameter is ignored if an SSL connection is not made.

Trait Implementations

impl Clone for DBURLConfig[src]

impl Debug for DBURLConfig[src]

impl Default for DBURLConfig[src]

impl<'de> Deserialize<'de> for DBURLConfig[src]

impl PartialEq<DBURLConfig> for DBURLConfig[src]

impl Serialize for DBURLConfig[src]

impl StructuralPartialEq for DBURLConfig[src]

Auto Trait Implementations

impl RefUnwindSafe for DBURLConfig

impl Send for DBURLConfig

impl Sync for DBURLConfig

impl Unpin for DBURLConfig

impl UnwindSafe for DBURLConfig

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> DynClone for T where
    T: Clone
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.