db

package
v0.0.0-...-cb39d06 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct{}

DB is the db interface

func (DB) Open

func (i DB) Open() *gorm.DB

Open opens a connection to the database

type Database

type Database interface {
	Open() *gorm.DB
}

Database defines the interface of a db client

type TestDB

type TestDB struct {
	// contains filtered or unexported fields
}

TestDB is a test-only database interface

func GetUniqueDB

func GetUniqueDB() TestDB

GetUniqueDB returns a unique database client for isolated tests

func (TestDB) Open

func (i TestDB) Open() *gorm.DB

Open a connection to the database

Jump to

Keyboard shortcuts

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