psql

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(options *DBOptions) (*sql.DB, error)

Connect is connection to database

Types

type DBOptions

type DBOptions struct {
	Host           string
	Port           int
	Username       string
	Password       string
	DBName         string
	ConnectTimeout int
	SSLCert        string
	SSLKey         string
	SSLRootCert    string
	SSLMode        string

	DataSourceName string
	DB             *sql.DB
}

DBOptions wrap options database

func ConnectConfig

func ConnectConfig(options DBOptions) (*DBOptions, error)

ConnectConfig is connection with return config

func (*DBOptions) DSN

func (options *DBOptions) DSN() error

DSN format connection

Jump to

Keyboard shortcuts

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