database

package
v0.0.0-...-525a05c Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2021 License: GPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connection

func Connection(ctx context.Context, cp ConnectionParams) *pg.DB

Connection creates a connection to a postgres database and returns it

func CreateSchema

func CreateSchema(db *pg.DB, schema string) error

CreateSchema creates the requested schema if it doesn't exist

Types

type ConnectionParams

type ConnectionParams struct {
	User     string
	Password string
	Host     string
	Port     string
	Database string
	Schema   string
}

ConnectionParams is a wrapper for the database connection info

Jump to

Keyboard shortcuts

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