feldera_types/transport/
postgres.rs

1use serde::{Deserialize, Serialize};
2use utoipa::ToSchema;
3
4/// Postgres input connector configuration.
5#[derive(Debug, Clone, Eq, PartialEq, Deserialize, Serialize, ToSchema)]
6pub struct PostgresReaderConfig {
7    /// Postgres URI.
8    /// See: <https://docs.rs/tokio-postgres/0.7.12/tokio_postgres/config/struct.Config.html>
9    pub uri: String,
10
11    /// Query that specifies what data to fetch from postgres.
12    pub query: String,
13}
14
15/// Postgres output connector configuration.
16#[derive(Debug, Clone, Eq, PartialEq, Deserialize, Serialize, ToSchema)]
17pub struct PostgresWriterConfig {
18    /// Postgres URI.
19    /// See: <https://docs.rs/tokio-postgres/0.7.12/tokio_postgres/config/struct.Config.html>
20    pub uri: String,
21
22    /// The table to write the output to.
23    pub table: String,
24
25    /// The CA certificate in PEM format.
26    pub ssl_ca_pem: Option<String>,
27
28    /// The client certificate in PEM format.
29    pub ssl_client_pem: Option<String>,
30
31    /// The client certificate key in PEM format.
32    pub ssl_client_key: Option<String>,
33
34    /// True to enable hostname verification when using TLS. True by default.
35    pub verify_hostname: Option<bool>,
36}