postgresql

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host     string
	User     string
	Password string
	Name     string
	Port     int

	SSLMode     string
	SSLRootCert string
	SSLKey      string
	SSLCert     string
	SSLInline   bool

	flags.FlagSet
}

func NewConfig

func NewConfig(flagSet *pflag.FlagSet) *Config

func (*Config) Connect

func (cfg *Config) Connect() (*sqlx.DB, error)

Connect attempts to connect to the database.

func (*Config) DSN added in v0.0.3

func (cfg *Config) DSN() (string, error)

DSN will return the DSN string.

Jump to

Keyboard shortcuts

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