GetPostgresDsn
Produces the DSN (data source name) for opening a postgres db connection.
def GetPostgresDsn(
ctx: context.Context,
pgConfig: PostgresConfig
) - > string
Produces the DSN (data source name) for opening a postgres db connection.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, used to resolve the password if it's dynamically sourced. |
| pgConfig | PostgresConfig | The configuration object containing details like host, port, database name, user, and password information for the PostgreSQL connection. |
Returns
| Type | Description |
|---|---|
string | The DSN string for connecting to a PostgreSQL database. |