db

package
v0.0.0-...-b9a56c5 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2017 License: GPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SQLFilesPath = "./sqls"
)

Variables

This section is empty.

Functions

func CheckAndCreateDB

func CheckAndCreateDB() (*goqu.Database, error)

CheckAndCreateDB Checks if database exists, if not, creates one with basic tables, admin user and indexes

func Connect

func Connect(dbdriver, dsn string) (*goqu.Database, error)

func ConnectMock

func ConnectMock(driver string, t *testing.T) (*goqu.Database, sqlmock.Sqlmock, error)

ConnectMock makes a mock database connection for testing purposes

func Get

func Get() *goqu.Database

Types

This section is empty.

Directories

Path Synopsis
models

Jump to

Keyboard shortcuts

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