database

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Database wrapper
	DB *sqlx.DB
)

Functions

func Connect

func Connect(d Databases)

Connect to the database

func DSN

func DSN(ci MySQLInfo) string

DSN returns the Data Source Name

Types

type Databases

type Databases struct {
	Type  string
	MySQL MySQLInfo
}

type MySQLInfo

type MySQLInfo struct {
	Username  string
	Password  string
	Name      string
	Hostname  string
	Port      int
	Parameter string
}

MySQLInfo is the details for the database connection

Jump to

Keyboard shortcuts

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