data

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: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ping

func Ping(connStr string) error

Ping tests connection to database.

func ReadAppVersion

func ReadAppVersion(db *DB) (string, bool)

ReadAppVersion returns AppVersion.

func WriteAppVersion

func WriteAppVersion(db *DB, version string) error

WriteAppVersion writes AppVersion.

Types

type DB

type DB struct {
	Host     string
	User     string
	Password string
	DBName   string
	Port     string
}

DB has a configuration for database connect.

func NewConfig

func NewConfig() *DB

NewConfig creates a default DB configuration.

func (*DB) ConnectionString

func (db *DB) ConnectionString() string

ConnectionString returns the DB connection string.

Jump to

Keyboard shortcuts

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