db

package
Version: v0.0.0-...-f2f702e Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseDB

func CloseDB()

CloseDB closes db TODO (Svein): Is DB needed at the end? We are in db-package, usage: db.Close() vs db.CloseDB()

func ConfigureDB

func ConfigureDB(info *MySQLInfo)

ConfigureDB loads database connection string TODO (Svein): Is DB needed at the end? We are in db-package, usage: db.Configure() vs db.ConfigureDB)

func GetDB

func GetDB() *sql.DB

GetDB returns db object TODO (Svein): Is DB needed at the end? We are in db-package, usage: db.Get() vs db.GetDB()

func OpenDB

func OpenDB()

OpenDB creates connection with database TODO (Svein): Is DB needed at the end? We are in db-package, usage: db.Open() vs db.OpenDB()

Types

type MySQLInfo

type MySQLInfo struct {
	Hostname  string `json:"hostname"`
	Port      int    `json:"port"`
	Username  string `json:"username"`
	Password  string `json:"password"`
	Database  string `json:"database"`
	ParseTime bool   `json:"parseTime"`
}

MySQLInfo struct

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL