postgres

package
v0.0.13-rc.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2020 License: AGPL-3.0 Imports: 6 Imported by: 79

Documentation

Index

Constants

View Source
const (
	DbConnectionFailedMsg = "db connection failed"
	SettingNodeFailedMsg  = "unable to set db node"
)

Variables

This section is empty.

Functions

func ErrDBConnectionFailed

func ErrDBConnectionFailed(connectErr error) error

func ErrUnableToSetNode

func ErrUnableToSetNode(setErr error) error

Types

type DB

type DB struct {
	*sqlx.DB
	Node   core.Node
	NodeID int64
}

func NewDB

func NewDB(databaseConfig config.Database, node core.Node) (*DB, error)

func (*DB) CreateNode

func (db *DB) CreateNode(node *core.Node) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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