dial

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 8 Imported by: 0

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL