database

package
v0.0.0-...-6be9b1d Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *sqlx.DB

DB is a global variable holding the database connection

Functions

func SetDB

func SetDB(c *Config) error

SetDB connects to the database and sets the connection as a global var

Types

type Config

type Config struct {
	Driver   string
	User     string
	Password string
	DBName   string
	Host     string
	Port     int
	SSLMode  string
}

Config contains values used to connect to the database

Jump to

Keyboard shortcuts

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