postgres

package
v0.0.0-...-1cea508 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: GPL-3.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 Client

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

func NewClient

func NewClient(logger zerolog.Logger, cfg models.DatabaseConfig) (Client, error)

Creates a postgres Client

func (*Client) GetConnection

func (p *Client) GetConnection() *pg.DB

Return the connection

func (*Client) Shutdown

func (p *Client) Shutdown() error

Signals a shutdown to the client

type DatabaseClient

type DatabaseClient interface {
	GetConnection() *pg.DB
	Shutdown() error
}

Jump to

Keyboard shortcuts

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