local

package
v1.22.2 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

DB provides a local running instance of postgres

func NewDB

func NewDB(dataDir string) *DB

NewDB returns a new local postgresql database.

func (*DB) IsRunning

func (db *DB) IsRunning() bool

IsRunning checks PostgreSQL server is running or not.

func (*DB) Name

func (db *DB) Name() string

Name returns data source name if server is running. Otherwise returns empty string.

func (*DB) Start

func (db *DB) Start() error

Start starts PostgreSQL.

func (*DB) Stop

func (db *DB) Stop() error

Stop stops the running PostgreSQL.

Jump to

Keyboard shortcuts

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