db

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

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

Go to latest
Published: Jun 16, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

DB is the instance that the other code can use to access the database.

Functions

func SetupConnection

func SetupConnection(dialect Dialect, args ...interface{}) (err error)

SetupConnection initializes the DB variable in this package.

func SetupSchema

func SetupSchema() (err error)

SetupSchema Creates the database tables.

func Shutdown

func Shutdown() (err error)

Shutdown closes the database connection.

Types

type Dialect

type Dialect string

Dialect is the database used. E.g sqlite3,mysql,... Currently only sqlite3 is supported.

const (
	// SQLITE dialect name.
	SQLITE Dialect = "sqlite3"
)

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