database

package
v0.0.0-...-a3af96b Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(cfg Config) (*sql.DB, error)

Open knows how to open a database connection based on the configuration.

func StatusCheck

func StatusCheck(ctx context.Context, db *sql.DB) error

StatusCheck returns nil if it can successfully talk to the database. It returns a non-nil error otherwise.

Types

type Config

type Config struct {
	Host       string
	Name       string
	User       string
	Password   string
	DisableTLS bool
}

Config is the required properties to use the database.

Jump to

Keyboard shortcuts

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