postgres

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

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 implements the database interface

func New

func New(log *zap.SugaredLogger, datadir string, host string, port int, user string, password string) *Postgres

New instantiates a new postgres database

func (*Postgres) Backup

func (db *Postgres) Backup() error

Backup takes a backup of the database

func (*Postgres) Check

func (db *Postgres) Check() (bool, error)

Check checks whether a backup needs to be restored or not, returns true if it needs a backup

func (*Postgres) Probe

func (db *Postgres) Probe() error

Probe indicates whether the database is running

func (*Postgres) Recover

func (db *Postgres) Recover() error

Recover restores a database backup

Jump to

Keyboard shortcuts

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