pgdrv

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DriverName = "postgres+ssh"

Variables

This section is empty.

Functions

This section is empty.

Types

type Dialer added in v0.2.0

type Dialer interface {
	Connect() error
	Dial(network, address string) (net.Conn, error)
	Close() error
}

Dialer is interface type for SSH Dialer.

type Driver

type Driver struct {
	Dialer
}

Driver is driver.Driver and pq.Dialer for PostgreSQL via SSH.

func New

func New(d Dialer) *Driver

New returns new Driver instance.

func (*Driver) DialTimeout

func (d *Driver) DialTimeout(network, address string, timeout time.Duration) (net.Conn, error)

DialTimeout makes socket connection via SSH (compatible pq.Dialer interface).

func (*Driver) Open

func (d *Driver) Open(s string) (driver.Conn, error)

Open opens connection to the server (compatible driver.Driver interface).

func (*Driver) Register

func (d *Driver) Register(name string)

Register makes a database driver available by name "postgres+ssh".

Jump to

Keyboard shortcuts

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