sqltesting

package
v0.0.0-...-c09693c Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const MemoryStructure = `` /* 378-byte string literal not displayed */

MemoryStructure is the database structure for a the sqlite "memory" database.

Variables

This section is empty.

Functions

func NewSQLiteDB

func NewSQLiteDB(ctx context.Context, l *log.Logger) (*sql.DB, error)

NewSQLiteDB creates a SQLite DB with the default structure

func NewTestingLog

func NewTestingLog(t *testing.T) *log.Logger

NewTestingLog creates a logger that outputs to the testing framework

Types

type MemoryStore

type MemoryStore struct {
	DB    *sql.DB
	Store storage.Repository
}

MemoryStore is a SQLite in-memory representation of a Repository.

func NewMemoryStore

func NewMemoryStore(ctx context.Context, l *log.Logger) (*MemoryStore, error)

NewMemoryStore returns a sqlite "in-memory" repository for local tests.

Jump to

Keyboard shortcuts

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