Documentation
¶
Overview ¶
Package dial opens a database connection for a configured connection, transparently setting up an SSH tunnel first when the connection requests one. It is shared by the CLI and the TUI so both get identical connect behavior.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Open ¶
func Open(ctx context.Context, cc config.ConnectionConfig, store secret.SecretStore) (driver.Conn, func() error, error)
Open resolves the connection's password, establishes an SSH tunnel if configured, and opens the driver against the (possibly tunneled) DSN. The returned close func shuts the connection and the tunnel; it is always safe to call and replaces a direct conn.Close().
func OpenWithPassword ¶
func OpenWithPassword(ctx context.Context, cc config.ConnectionConfig, store secret.SecretStore, password string) (driver.Conn, func() error, error)
OpenWithPassword opens using an explicit, already-known password — used by the TUI's "test before save" flow, where the typed password is not yet in the secret store. An empty password falls back to Open's store/ref resolution.
Types ¶
This section is empty.