db

package
v0.0.0-...-3c0424e Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDataStore

func NewDataStore(logger *logrus.Logger, cfg Config) (app.DataStore, error)

NewDataStore creates a new database handle.

Types

type Config

type Config struct {
	Host       string
	Port       int
	Username   string
	Password   string
	Database   string
	DisableTLS bool
}

Config specifies how to connect to the database server.

func NewConfigFromEnv

func NewConfigFromEnv() (cfg Config, err error)

NewConfigFromEnv attempts to construct a new Config using data from environment variables.

Jump to

Keyboard shortcuts

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