dbengine

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2019 License: GPL-3.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hash

func Hash(installPath string) string

Hash returns db engine service unique ID.

func SetPort

func SetPort(pgconf, oldPort, newPort string) error

SetPort sets db engine port number.

Types

type DBEngine

type DBEngine struct {
	ServiceName string
	DB          *data.DB
	Timeout     uint64 // in seconds
}

DBEngine has a db engine configuration.

func NewConfig

func NewConfig() *DBEngine

NewConfig creates a default DBEngine configuration.

func (*DBEngine) CreateDatabase

func (engine *DBEngine) CreateDatabase(fileName string) error

CreateDatabase creates new database.

func (*DBEngine) Install

func (engine *DBEngine) Install(installPath string) error

Install installs a DB engine.

func (DBEngine) Ping

func (engine DBEngine) Ping() error

Ping tests connection to database.

func (*DBEngine) Remove

func (engine *DBEngine) Remove(installPath string) error

Remove removes the DB engine.

func (*DBEngine) Start

func (engine *DBEngine) Start(installPath string) error

Start starts the DB engine.

func (*DBEngine) Stop

func (engine *DBEngine) Stop(installPath string) error

Stop stops the DB engine.

func (DBEngine) UpdateDatabase

func (engine DBEngine) UpdateDatabase(fileName string) error

UpdateDatabase executes db migrations scripts.

Jump to

Keyboard shortcuts

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