db

package
v0.0.0-...-2b31a26 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2019 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package db provides simple database abstractions for common operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Postgres

type Postgres struct {
	// contains filtered or unexported fields
}

Postgres contains a pointer of sql.DB and represents the database abrastraction for Postgresql-compatible databases.

func NewPostgres

func NewPostgres(postgresURL string) Postgres

NewPostgres returns a Postgres implementation given an postgres URL.

func (Postgres) CheckConnection

func (pq Postgres) CheckConnection() error

CheckConnection runs a simple `SELECT 1` on the Postgres database connection instantied and returns an error if some.

Jump to

Keyboard shortcuts

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