postgres

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToDatabase

func ConnectToDatabase(cfg *ConnectionConfig) (*relational.DB, error)

ConnectToDatabase - Creates a new connection to a PSQL database with the given configuration.

func CreateDatabase

func CreateDatabase(cfg ConnectionConfig) error

CreateDatabase - Creates a new database with the given configuration

func DeleteDatabase

func DeleteDatabase(cfg ConnectionConfig) error

DeleteDatabase - Deletes an existing database with the given configuration

Types

type ConnectionConfig

type ConnectionConfig struct {
	Username string
	Password string
	Host     string
	Database string
	SSL      bool
	Verbose  bool
}

Jump to

Keyboard shortcuts

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