data

package
v0.0.0-...-58aeaf4 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2019 License: MPL-2.0 Imports: 6 Imported by: 0

README

Data

Data contains code that transforms outside storage systems, like our database into golang models that are usable by the rest of the project.

So basically it stores database-y stuff.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToTestDB

func ConnectToTestDB(t *testing.T) *sql.DB

ConnectToTestDB creates a new test db pool and sets it to data.pool Call this if you're using data.pool somewhere inside a function and want your test to use our test db.

func GetPool

func GetPool() *sql.DB

GetPool is a safer interface for accessing the Pool

func NewDB

func NewDB() (*sql.DB, error)

NewDB opens a standard DB

func NewTestDB

func NewTestDB() (*sql.DB, error)

NewTestDB creates a new of the test database

func SetupTestDB

func SetupTestDB()

SetupTestDB is used to setup a transactional database. Use it inside of an `init` function in a test file.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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