Documentation
¶
Overview ¶
package postgres provides methods for connecting to a postgres database either raw or via ssh. Cribbed from vinzenz/dial-pq-via-ssh.go
Index ¶
- func ConnectDB(c *Config) (*sql.DB, error)
- func ConnectDBViaSSH(c *Config) (*sql.DB, error)
- func InitConnection(opts ...func(*Config)) (*sql.DB, error)
- func WithDatabase(dbHost, dbUser, dbPass, dbName string) func(*Config)
- func WithSSH(sshHost, sshPort, sshUser, sshPass string) func(config *Config)
- type Config
- type ViaSSHDialer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithDatabase ¶
Types ¶
type ViaSSHDialer ¶
type ViaSSHDialer struct {
// contains filtered or unexported fields
}
func (*ViaSSHDialer) Dial ¶
func (self *ViaSSHDialer) Dial(network, address string) (net.Conn, error)
func (*ViaSSHDialer) DialTimeout ¶
Click to show internal directories.
Click to hide internal directories.