pub struct ConnectionParams {
pub host: Option<String>,
pub host_secret: Option<SecretKeySelector>,
pub port: Option<u16>,
pub port_secret: Option<SecretKeySelector>,
pub dbname: Option<String>,
pub dbname_secret: Option<SecretKeySelector>,
pub username: Option<String>,
pub username_secret: Option<SecretKeySelector>,
pub password: Option<String>,
pub password_secret: Option<SecretKeySelector>,
pub ssl_mode: Option<String>,
pub ssl_mode_secret: Option<SecretKeySelector>,
}Expand description
Structured connection parameters for building a PostgreSQL connection URL.
Each field supports either a literal value or a reference to a Kubernetes
Secret key. For each parameter, set either the literal field or the
corresponding *Secret field — not both.
# Zalando pattern — literals for non-sensitive, secrets for credentials
params:
host: my-cluster-postgres
port: 5432
dbname: mydb
sslMode: require
usernameSecret:
name: pg-creds
key: username
passwordSecret:
name: pg-creds
key: passwordFields§
§host: Option<String>PostgreSQL host as a literal value.
host_secret: Option<SecretKeySelector>PostgreSQL host from a Secret key.
port: Option<u16>Port as a literal value. Defaults to 5432 if neither port nor portSecret is set.
port_secret: Option<SecretKeySelector>Port from a Secret key.
dbname: Option<String>Database name as a literal value.
dbname_secret: Option<SecretKeySelector>Database name from a Secret key.
username: Option<String>Username as a literal value.
username_secret: Option<SecretKeySelector>Username from a Secret key.
password: Option<String>Password as a literal value (not recommended for production).
password_secret: Option<SecretKeySelector>Password from a Secret key (recommended).
ssl_mode: Option<String>SSL mode as a literal value.
ssl_mode_secret: Option<SecretKeySelector>SSL mode from a Secret key.
Trait Implementations§
Source§impl Clone for ConnectionParams
impl Clone for ConnectionParams
Source§fn clone(&self) -> ConnectionParams
fn clone(&self) -> ConnectionParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConnectionParams
impl Debug for ConnectionParams
Source§impl<'de> Deserialize<'de> for ConnectionParams
impl<'de> Deserialize<'de> for ConnectionParams
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for ConnectionParams
impl JsonSchema for ConnectionParams
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for ConnectionParams
impl RefUnwindSafe for ConnectionParams
impl Send for ConnectionParams
impl Sync for ConnectionParams
impl Unpin for ConnectionParams
impl UnsafeUnpin for ConnectionParams
impl UnwindSafe for ConnectionParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ServiceExt for T
impl<T> ServiceExt for T
Source§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Apply a transformation to the response body. Read more
Source§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
Source§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more